12#ifndef ZEPHYR_INCLUDE_NET_NET_OFFLOAD_H_
13#define ZEPHYR_INCLUDE_NET_NET_OFFLOAD_H_
30#if defined(CONFIG_NET_OFFLOAD)
142static inline int net_offload_get(
struct net_if *
iface,
168static inline int net_offload_bind(
struct net_if *
iface,
192static inline int net_offload_listen(
struct net_if *
iface,
232static inline int net_offload_connect(
struct net_if *
iface,
245 context, addr, addrlen, cb,
246 timeout_to_int32(timeout),
277static inline int net_offload_accept(
struct net_if *
iface,
289 timeout_to_int32(timeout),
319static inline int net_offload_send(
struct net_if *
iface,
331 timeout_to_int32(timeout),
363static inline int net_offload_sendto(
struct net_if *
iface,
376 pkt, dst_addr, addrlen, cb,
377 timeout_to_int32(timeout),
414static inline int net_offload_recv(
struct net_if *
iface,
426 timeout_to_int32(timeout),
443static inline int net_offload_put(
struct net_if *
iface,
457static inline int net_offload_get(
struct net_if *
iface,
466static inline int net_offload_bind(
struct net_if *
iface,
474static inline int net_offload_listen(
struct net_if *
iface,
481static inline int net_offload_connect(
struct net_if *
iface,
492static inline int net_offload_accept(
struct net_if *
iface,
501static inline int net_offload_send(
struct net_if *
iface,
510static inline int net_offload_sendto(
struct net_if *
iface,
521static inline int net_offload_recv(
struct net_if *
iface,
530static inline int net_offload_put(
struct net_if *
iface,
static int bind(int sock, const struct sockaddr *addr, socklen_t addrlen)
POSIX wrapper for zsock_bind.
Definition: socket.h:891
static int accept(int sock, struct sockaddr *addr, socklen_t *addrlen)
POSIX wrapper for zsock_accept.
Definition: socket.h:910
static int listen(int sock, int backlog)
POSIX wrapper for zsock_listen.
Definition: socket.h:904
static ssize_t sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)
POSIX wrapper for zsock_sendto.
Definition: socket.h:928
static ssize_t send(int sock, const void *buf, size_t len, int flags)
POSIX wrapper for zsock_send.
Definition: socket.h:916
static int connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
POSIX wrapper for zsock_connect.
Definition: socket.h:897
static ssize_t recv(int sock, void *buf, size_t max_len, int flags)
POSIX wrapper for zsock_recv.
Definition: socket.h:922
#define K_FOREVER
Generate infinite timeout delay.
Definition: kernel.h:1363
#define K_NO_WAIT
Generate null timeout delay.
Definition: kernel.h:1253
#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:164
net_sock_type
Socket type.
Definition: net_ip.h:84
size_t socklen_t
Length of a socket address.
Definition: net_ip.h:168
net_ip_protocol
Protocol numbers from IANA/BSD.
Definition: net_ip.h:62
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:97
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:138
void(* net_context_send_cb_t)(struct net_context *context, int status, void *user_data)
Network data send callback.
Definition: net_context.h:118
void(* net_context_connect_cb_t)(struct net_context *context, int status, void *user_data)
Connection callback.
Definition: net_context.h:165
static struct net_offload * net_if_offload(struct net_if *iface)
Return the IP offload plugin.
Definition: net_if.h:992
#define k_ticks_to_ms_floor32(t)
Convert ticks to milliseconds.
Definition: time_units.h:1701
Network context definitions.
IPv6 and IPv4 definitions.
__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:205
void * user_data
User data associated with a context.
Definition: net_context.h:212
int8_t iface
Network interface assigned to this context.
Definition: net_context.h:376
Network Interface structure.
Definition: net_if.h:678
Network packet.
Definition: net_pkt.h:67
Generic sockaddr struct.
Definition: net_ip.h:385