12#ifndef ZEPHYR_INCLUDE_NET_NET_OFFLOAD_H_
13#define ZEPHYR_INCLUDE_NET_NET_OFFLOAD_H_
32#if defined(CONFIG_NET_OFFLOAD)
144static inline int net_offload_get(
struct net_if *
iface,
170static inline int net_offload_bind(
struct net_if *
iface,
194static inline int net_offload_listen(
struct net_if *
iface,
234static inline int net_offload_connect(
struct net_if *
iface,
247 context, addr, addrlen, cb,
248 timeout_to_int32(timeout),
279static inline int net_offload_accept(
struct net_if *
iface,
291 timeout_to_int32(timeout),
321static inline int net_offload_send(
struct net_if *
iface,
333 timeout_to_int32(timeout),
365static inline int net_offload_sendto(
struct net_if *
iface,
378 pkt, dst_addr, addrlen, cb,
379 timeout_to_int32(timeout),
416static inline int net_offload_recv(
struct net_if *
iface,
428 timeout_to_int32(timeout),
445static inline int net_offload_put(
struct net_if *
iface,
459static inline int net_offload_get(
struct net_if *
iface,
468static inline int net_offload_bind(
struct net_if *
iface,
476static inline int net_offload_listen(
struct net_if *
iface,
483static inline int net_offload_connect(
struct net_if *
iface,
494static inline int net_offload_accept(
struct net_if *
iface,
503static inline int net_offload_send(
struct net_if *
iface,
512static inline int net_offload_sendto(
struct net_if *
iface,
523static inline int net_offload_recv(
struct net_if *
iface,
532static inline int net_offload_put(
struct net_if *
iface,
#define K_FOREVER
Generate infinite timeout delay.
Definition kernel.h:1446
#define K_NO_WAIT
Generate null timeout delay.
Definition kernel.h:1336
#define K_TIMEOUT_EQ(a, b)
Compare timeouts for equality.
Definition sys_clock.h:80
unsigned short int sa_family_t
Socket address family type.
Definition net_ip.h:168
net_sock_type
Socket type.
Definition net_ip.h:88
size_t socklen_t
Length of a socket address.
Definition net_ip.h:172
net_ip_protocol
Protocol numbers from IANA/BSD.
Definition net_ip.h:64
void(* net_context_connect_cb_t)(struct net_context *context, int status, void *user_data)
Connection callback.
Definition net_context.h:167
void(* net_context_send_cb_t)(struct net_context *context, int status, void *user_data)
Network data send callback.
Definition net_context.h:120
void(* net_tcp_accept_cb_t)(struct net_context *new_context, struct sockaddr *addr, socklen_t addrlen, int status, void *user_data)
Accept callback.
Definition net_context.h:140
void(* net_context_recv_cb_t)(struct net_context *context, struct net_pkt *pkt, union net_ip_header *ip_hdr, union net_proto_header *proto_hdr, int status, void *user_data)
Network data receive callback.
Definition net_context.h:99
static struct net_offload * net_if_offload(struct net_if *iface)
Return the IP offload plugin.
Definition net_if.h:1016
#define k_ticks_to_ms_floor32(t)
Convert ticks to milliseconds.
Definition time_units.h:1701
Network context definitions.
IPv6 and IPv4 definitions.
int bind(int sock, const struct sockaddr *addr, socklen_t addrlen)
ssize_t send(int sock, const void *buf, size_t len, int flags)
int accept(int sock, struct sockaddr *addr, socklen_t *addrlen)
int listen(int sock, int backlog)
int connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
ssize_t sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)
ssize_t recv(int sock, void *buf, size_t max_len, int flags)
__INT32_TYPE__ int32_t
Definition stdint.h:74
Kernel timeout type.
Definition sys_clock.h:65
k_ticks_t ticks
Definition sys_clock.h:66
Note that we do not store the actual source IP address in the context because the address is already ...
Definition net_context.h:207
void * user_data
User data associated with a context.
Definition net_context.h:214
int8_t iface
Network interface assigned to this context.
Definition net_context.h:408
Network Interface structure.
Definition net_if.h:692
Network packet.
Definition net_pkt.h:91
Generic sockaddr struct.
Definition net_ip.h:408