Zephyr Project API  3.2.0
A Scalable Open Source RTOS
net_context.h
Go to the documentation of this file.
1
7/*
8 * Copyright (c) 2016 Intel Corporation
9 * Copyright (c) 2021 Nordic Semiconductor
10 *
11 * SPDX-License-Identifier: Apache-2.0
12 */
13
14#ifndef ZEPHYR_INCLUDE_NET_NET_CONTEXT_H_
15#define ZEPHYR_INCLUDE_NET_NET_CONTEXT_H_
16
24#include <zephyr/kernel.h>
25#include <zephyr/sys/atomic.h>
26
27#include <zephyr/net/net_ip.h>
28#include <zephyr/net/net_if.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
36#define NET_CONTEXT_IN_USE BIT(0)
37
47};
48
54#define NET_CONTEXT_FAMILY (BIT(3) | BIT(4) | BIT(5))
55
57#define NET_CONTEXT_TYPE (BIT(6) | BIT(7))
58
60#define NET_CONTEXT_REMOTE_ADDR_SET BIT(8)
61
63#define NET_CONTEXT_ACCEPTING_SOCK BIT(9)
64
66#define NET_CONTEXT_CLOSING_SOCK BIT(10)
67
68/* Context is bound to a specific interface */
69#define NET_CONTEXT_BOUND_TO_IFACE BIT(11)
70
71struct net_context;
72
93typedef void (*net_context_recv_cb_t)(struct net_context *context,
94 struct net_pkt *pkt,
95 union net_ip_header *ip_hdr,
96 union net_proto_header *proto_hdr,
97 int status,
98 void *user_data);
99
114typedef void (*net_context_send_cb_t)(struct net_context *context,
115 int status,
116 void *user_data);
117
134typedef void (*net_tcp_accept_cb_t)(struct net_context *new_context,
135 struct sockaddr *addr,
136 socklen_t addrlen,
137 int status,
138 void *user_data);
139
161typedef void (*net_context_connect_cb_t)(struct net_context *context,
162 int status,
163 void *user_data);
164
165/* The net_pkt_get_slab_func_t is here in order to avoid circular
166 * dependency between net_pkt.h and net_context.h
167 */
176typedef struct k_mem_slab *(*net_pkt_get_slab_func_t)(void);
177
178/* The net_pkt_get_pool_func_t is here in order to avoid circular
179 * dependency between net_pkt.h and net_context.h
180 */
189typedef struct net_buf_pool *(*net_pkt_get_pool_func_t)(void);
190
191struct net_tcp;
192
193struct net_conn_handle;
194
201__net_socket struct net_context {
205
209
213
216 struct k_mutex lock;
217
221 struct sockaddr_ptr local;
222
227
229 struct net_conn_handle *conn_handler;
230
235
240
245
246#if defined(CONFIG_NET_CONTEXT_NET_PKT_POOL)
250
253 net_pkt_get_pool_func_t data_pool;
254#endif /* CONFIG_NET_CONTEXT_NET_PKT_POOL */
255
256#if defined(CONFIG_NET_TCP)
258 void *tcp;
259#endif /* CONFIG_NET_TCP */
260
261#if defined(CONFIG_NET_CONTEXT_SYNC_RECV)
265 struct k_sem recv_data_wait;
266#endif /* CONFIG_NET_CONTEXT_SYNC_RECV */
267
268#if defined(CONFIG_NET_SOCKETS)
270 void *socket_data;
271
273 union {
274 struct k_fifo recv_q;
275 struct k_fifo accept_q;
276 };
277
278 struct {
280 struct k_condvar recv;
281
283 struct k_mutex *lock;
284 } cond;
285#endif /* CONFIG_NET_SOCKETS */
286
287#if defined(CONFIG_NET_OFFLOAD)
289 void *offload_context;
290#endif /* CONFIG_NET_OFFLOAD */
291
292#if defined(CONFIG_NET_SOCKETS_CAN)
293 int can_filter_id;
294#endif /* CONFIG_NET_SOCKETS_CAN */
295
297 struct {
298#if defined(CONFIG_NET_CONTEXT_PRIORITY)
300 uint8_t priority;
301#endif
302#if defined(CONFIG_NET_CONTEXT_TXTIME)
303 bool txtime;
304#endif
305#if defined(CONFIG_SOCKS)
306 struct {
307 struct sockaddr addr;
308 socklen_t addrlen;
309 } proxy;
310#endif
311#if defined(CONFIG_NET_CONTEXT_RCVTIMEO)
312 k_timeout_t rcvtimeo;
313#endif
314#if defined(CONFIG_NET_CONTEXT_SNDTIMEO)
315 k_timeout_t sndtimeo;
316#endif
317#if defined(CONFIG_NET_CONTEXT_RCVBUF)
318 uint16_t rcvbuf;
319#endif
320#if defined(CONFIG_NET_CONTEXT_SNDBUF)
321 uint16_t sndbuf;
322#endif
324
327
330
333
335 union {
338 };
339
340#if defined(CONFIG_SOCKS)
341 bool proxy_enabled;
342#endif
343
344};
345
346static inline bool net_context_is_used(struct net_context *context)
347{
348 NET_ASSERT(context);
349
350 return context->flags & NET_CONTEXT_IN_USE;
351}
352
353static inline bool net_context_is_bound_to_iface(struct net_context *context)
354{
355 NET_ASSERT(context);
356
357 return context->flags & NET_CONTEXT_BOUND_TO_IFACE;
358}
359
367static inline bool net_context_is_accepting(struct net_context *context)
368{
369 NET_ASSERT(context);
370
371 return context->flags & NET_CONTEXT_ACCEPTING_SOCK;
372}
373
380static inline void net_context_set_accepting(struct net_context *context,
381 bool accepting)
382{
383 NET_ASSERT(context);
384
385 if (accepting) {
387 } else {
388 context->flags &= ~NET_CONTEXT_ACCEPTING_SOCK;
389 }
390}
391
399static inline bool net_context_is_closing(struct net_context *context)
400{
401 NET_ASSERT(context);
402
403 return context->flags & NET_CONTEXT_CLOSING_SOCK;
404}
405
412static inline void net_context_set_closing(struct net_context *context,
413 bool closing)
414{
415 NET_ASSERT(context);
416
417 if (closing) {
419 } else {
420 context->flags &= ~NET_CONTEXT_CLOSING_SOCK;
421 }
422}
423
424#define NET_CONTEXT_STATE_SHIFT 1
425#define NET_CONTEXT_STATE_MASK 0x03
426
436static inline
438{
439 NET_ASSERT(context);
440
441 return (enum net_context_state)
442 ((context->flags >> NET_CONTEXT_STATE_SHIFT) &
444}
445
454static inline void net_context_set_state(struct net_context *context,
456{
457 NET_ASSERT(context);
458
460 context->flags |= ((state & NET_CONTEXT_STATE_MASK) <<
462}
463
474static inline sa_family_t net_context_get_family(struct net_context *context)
475{
476 NET_ASSERT(context);
477
478 return ((context->flags & NET_CONTEXT_FAMILY) >> 3);
479}
480
490static inline void net_context_set_family(struct net_context *context,
491 sa_family_t family)
492{
493 uint8_t flag = 0U;
494
495 NET_ASSERT(context);
496
497 if (family == AF_UNSPEC || family == AF_INET || family == AF_INET6 ||
498 family == AF_PACKET || family == AF_CAN) {
499 /* Family is in BIT(4), BIT(5) and BIT(6) */
500 flag = family << 3;
501 }
502
503 context->flags |= flag;
504}
505
516static inline
518{
519 NET_ASSERT(context);
520
521 return (enum net_sock_type)((context->flags & NET_CONTEXT_TYPE) >> 6);
522}
523
533static inline void net_context_set_type(struct net_context *context,
534 enum net_sock_type type)
535{
536 uint16_t flag = 0U;
537
538 NET_ASSERT(context);
539
540 if (type == SOCK_DGRAM || type == SOCK_STREAM || type == SOCK_RAW) {
541 /* Type is in BIT(6) and BIT(7)*/
542 flag = type << 6;
543 }
544
545 context->flags |= flag;
546}
547
556#if defined(CONFIG_NET_SOCKETS_CAN)
557static inline void net_context_set_can_filter_id(struct net_context *context,
558 int filter_id)
559{
560 NET_ASSERT(context);
561
562 context->can_filter_id = filter_id;
563}
564#else
565static inline void net_context_set_can_filter_id(struct net_context *context,
566 int filter_id)
567{
568 ARG_UNUSED(context);
569 ARG_UNUSED(filter_id);
570}
571#endif
572
582#if defined(CONFIG_NET_SOCKETS_CAN)
583static inline int net_context_get_can_filter_id(struct net_context *context)
584{
585 NET_ASSERT(context);
586
587 return context->can_filter_id;
588}
589#else
590static inline int net_context_get_can_filter_id(struct net_context *context)
591{
592 ARG_UNUSED(context);
593
594 return -1;
595}
596#endif
597
608static inline uint16_t net_context_get_proto(struct net_context *context)
609{
610 return context->proto;
611}
612
623static inline void net_context_set_proto(struct net_context *context,
624 uint16_t proto)
625{
626 context->proto = proto;
627}
628
639static inline
641{
642 NET_ASSERT(context);
643
644 return net_if_get_by_index(context->iface);
645}
646
655static inline void net_context_set_iface(struct net_context *context,
656 struct net_if *iface)
657{
658 NET_ASSERT(iface);
659
660 context->iface = net_if_get_by_iface(iface);
661}
662
663static inline uint8_t net_context_get_ipv4_ttl(struct net_context *context)
664{
665 return context->ipv4_ttl;
666}
667
668static inline void net_context_set_ipv4_ttl(struct net_context *context,
669 uint8_t ttl)
670{
671 context->ipv4_ttl = ttl;
672}
673
675{
676 return context->ipv6_hop_limit;
677}
678
679static inline void net_context_set_ipv6_hop_limit(struct net_context *context,
680 uint8_t hop_limit)
681{
682 context->ipv6_hop_limit = hop_limit;
683}
684
685#if defined(CONFIG_SOCKS)
686static inline void net_context_set_proxy_enabled(struct net_context *context,
687 bool enable)
688{
689 context->proxy_enabled = enable;
690}
691
692static inline bool net_context_is_proxy_enabled(struct net_context *context)
693{
694 return context->proxy_enabled;
695}
696#else
697static inline void net_context_set_proxy_enabled(struct net_context *context,
698 bool enable)
699{
700 ARG_UNUSED(context);
701 ARG_UNUSED(enable);
702}
703
704static inline bool net_context_is_proxy_enabled(struct net_context *context)
705{
706 return false;
707}
708#endif
709
728 enum net_sock_type type,
729 uint16_t ip_proto,
730 struct net_context **context);
731
745int net_context_put(struct net_context *context);
746
759int net_context_ref(struct net_context *context);
760
774int net_context_unref(struct net_context *context);
775
786#if defined(CONFIG_NET_IPV4)
787int net_context_create_ipv4_new(struct net_context *context,
788 struct net_pkt *pkt,
789 const struct in_addr *src,
790 const struct in_addr *dst);
791#else
792static inline int net_context_create_ipv4_new(struct net_context *context,
793 struct net_pkt *pkt,
794 const struct in_addr *src,
795 const struct in_addr *dst)
796{
797 return -1;
798}
799#endif /* CONFIG_NET_IPV4 */
800
811#if defined(CONFIG_NET_IPV6)
812int net_context_create_ipv6_new(struct net_context *context,
813 struct net_pkt *pkt,
814 const struct in6_addr *src,
815 const struct in6_addr *dst);
816#else
817static inline int net_context_create_ipv6_new(struct net_context *context,
818 struct net_pkt *pkt,
819 const struct in6_addr *src,
820 const struct in6_addr *dst)
821{
822 return -1;
823}
824#endif /* CONFIG_NET_IPV6 */
825
837int net_context_bind(struct net_context *context,
838 const struct sockaddr *addr,
839 socklen_t addrlen);
840
851int net_context_listen(struct net_context *context,
852 int backlog);
853
883 const struct sockaddr *addr,
884 socklen_t addrlen,
887 void *user_data);
888
914int net_context_accept(struct net_context *context,
917 void *user_data);
918
938int net_context_send(struct net_context *context,
939 const void *buf,
940 size_t len,
943 void *user_data);
944
966int net_context_sendto(struct net_context *context,
967 const void *buf,
968 size_t len,
969 const struct sockaddr *dst_addr,
970 socklen_t addrlen,
973 void *user_data);
974
994 const struct msghdr *msghdr,
995 int flags,
998 void *user_data);
999
1036int net_context_recv(struct net_context *context,
1039 void *user_data);
1040
1062 int32_t delta);
1063
1072};
1073
1085 enum net_context_option option,
1086 const void *value, size_t len);
1087
1099 enum net_context_option option,
1100 void *value, size_t *len);
1101
1109typedef void (*net_context_cb_t)(struct net_context *context, void *user_data);
1110
1119
1140#if defined(CONFIG_NET_CONTEXT_NET_PKT_POOL)
1141static inline void net_context_setup_pools(struct net_context *context,
1143 net_pkt_get_pool_func_t data_pool)
1144{
1145 NET_ASSERT(context);
1146
1147 context->tx_slab = tx_slab;
1148 context->data_pool = data_pool;
1149}
1150#else
1151#define net_context_setup_pools(context, tx_pool, data_pool)
1152#endif
1153
1168 uint16_t local_port, const struct sockaddr *local_addr);
1169
1170#ifdef __cplusplus
1171}
1172#endif
1173
1178#endif /* ZEPHYR_INCLUDE_NET_NET_CONTEXT_H_ */
long atomic_t
Definition: atomic.h:22
ZTEST_BMEM int timeout
Definition: main.c:31
static ssize_t recv(int sock, void *buf, size_t max_len, int flags)
Definition: socket.h:744
unsigned short int sa_family_t
Definition: net_ip.h:164
#define AF_CAN
Definition: net_ip.h:56
#define AF_INET
Definition: net_ip.h:53
#define AF_INET6
Definition: net_ip.h:54
#define AF_PACKET
Definition: net_ip.h:55
net_sock_type
Definition: net_ip.h:84
size_t socklen_t
Definition: net_ip.h:167
#define AF_UNSPEC
Definition: net_ip.h:52
net_ip_protocol
Definition: net_ip.h:62
@ SOCK_DGRAM
Definition: net_ip.h:86
@ SOCK_RAW
Definition: net_ip.h:87
@ SOCK_STREAM
Definition: net_ip.h:85
static void net_context_set_type(struct net_context *context, enum net_sock_type type)
Set context type for this network context.
Definition: net_context.h:533
void(* net_context_cb_t)(struct net_context *context, void *user_data)
Callback used while iterating over network contexts.
Definition: net_context.h:1109
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:93
static void net_context_set_ipv6_hop_limit(struct net_context *context, uint8_t hop_limit)
Definition: net_context.h:679
int net_context_unref(struct net_context *context)
Decrement the reference count to a network context.
int net_context_bind(struct net_context *context, const struct sockaddr *addr, socklen_t addrlen)
Assign a socket a local address.
static void net_context_set_iface(struct net_context *context, struct net_if *iface)
Set network interface for this context.
Definition: net_context.h:655
static void net_context_set_ipv4_ttl(struct net_context *context, uint8_t ttl)
Definition: net_context.h:668
int net_context_accept(struct net_context *context, net_tcp_accept_cb_t cb, k_timeout_t timeout, void *user_data)
Accept a network connection attempt.
int net_context_put(struct net_context *context)
Close and unref a network context.
static enum net_sock_type net_context_get_type(struct net_context *context)
Get context type for this network context.
Definition: net_context.h:517
static bool net_context_is_accepting(struct net_context *context)
Is this context is accepting data now.
Definition: net_context.h:367
static sa_family_t net_context_get_family(struct net_context *context)
Get address family for this network context.
Definition: net_context.h:474
static bool net_context_is_bound_to_iface(struct net_context *context)
Definition: net_context.h:353
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:134
int net_context_listen(struct net_context *context, int backlog)
Mark the context as a listening one.
static bool net_context_is_used(struct net_context *context)
Definition: net_context.h:346
int net_context_sendmsg(struct net_context *context, const struct msghdr *msghdr, int flags, net_context_send_cb_t cb, k_timeout_t timeout, void *user_data)
Send data in iovec to a peer specified in msghdr struct.
struct k_mem_slab *(* net_pkt_get_slab_func_t)(void)
Function that is called to get the slab that is used for net_pkt allocations.
Definition: net_context.h:176
int net_context_ref(struct net_context *context)
Take a reference count to a net_context, preventing destruction.
void(* net_context_send_cb_t)(struct net_context *context, int status, void *user_data)
Network data send callback.
Definition: net_context.h:114
static enum net_context_state net_context_get_state(struct net_context *context)
Get state for this network context.
Definition: net_context.h:437
struct net_buf_pool *(* net_pkt_get_pool_func_t)(void)
Function that is called to get the pool that is used for net_buf allocations.
Definition: net_context.h:189
int net_context_connect(struct net_context *context, const struct sockaddr *addr, socklen_t addrlen, net_context_connect_cb_t cb, k_timeout_t timeout, void *user_data)
Create a network connection.
static void net_context_set_can_filter_id(struct net_context *context, int filter_id)
Set CAN filter id for this network context.
Definition: net_context.h:565
static bool net_context_is_proxy_enabled(struct net_context *context)
Definition: net_context.h:704
#define NET_CONTEXT_IN_USE
Definition: net_context.h:36
static void net_context_set_accepting(struct net_context *context, bool accepting)
Set this context to accept data now.
Definition: net_context.h:380
net_context_state
Definition: net_context.h:39
bool net_context_port_in_use(enum net_ip_protocol ip_proto, uint16_t local_port, const struct sockaddr *local_addr)
Check if a port is in use (bound)
static void net_context_set_family(struct net_context *context, sa_family_t family)
Set address family for this network context.
Definition: net_context.h:490
static int net_context_create_ipv6_new(struct net_context *context, struct net_pkt *pkt, const struct in6_addr *src, const struct in6_addr *dst)
Create IPv6 packet in provided net_pkt from context.
Definition: net_context.h:817
static int net_context_create_ipv4_new(struct net_context *context, struct net_pkt *pkt, const struct in_addr *src, const struct in_addr *dst)
Create IPv4 packet in provided net_pkt from context.
Definition: net_context.h:792
int net_context_recv(struct net_context *context, net_context_recv_cb_t cb, k_timeout_t timeout, void *user_data)
Receive network data from a peer specified by context.
static int net_context_get_can_filter_id(struct net_context *context)
Get CAN filter id for this network context.
Definition: net_context.h:590
#define NET_CONTEXT_CLOSING_SOCK
Definition: net_context.h:66
static uint8_t net_context_get_ipv6_hop_limit(struct net_context *context)
Definition: net_context.h:674
static void net_context_set_closing(struct net_context *context, bool closing)
Set this context to closing.
Definition: net_context.h:412
static void net_context_set_proxy_enabled(struct net_context *context, bool enable)
Definition: net_context.h:697
static uint8_t net_context_get_ipv4_ttl(struct net_context *context)
Definition: net_context.h:663
#define NET_CONTEXT_BOUND_TO_IFACE
Definition: net_context.h:69
void(* net_context_connect_cb_t)(struct net_context *context, int status, void *user_data)
Connection callback.
Definition: net_context.h:161
static void net_context_set_state(struct net_context *context, enum net_context_state state)
Set state for this network context.
Definition: net_context.h:454
net_context_option
Definition: net_context.h:1064
int net_context_update_recv_wnd(struct net_context *context, int32_t delta)
Update TCP receive window for context.
void net_context_foreach(net_context_cb_t cb, void *user_data)
Go through all the network connections and call callback for each network context.
int net_context_set_option(struct net_context *context, enum net_context_option option, const void *value, size_t len)
Set an connection option for this context.
#define NET_CONTEXT_STATE_MASK
Definition: net_context.h:425
int net_context_send(struct net_context *context, const void *buf, size_t len, net_context_send_cb_t cb, k_timeout_t timeout, void *user_data)
Send data to a peer.
static bool net_context_is_closing(struct net_context *context)
Is this context closing.
Definition: net_context.h:399
#define NET_CONTEXT_FAMILY
Definition: net_context.h:54
#define NET_CONTEXT_TYPE
Definition: net_context.h:57
#define NET_CONTEXT_STATE_SHIFT
Definition: net_context.h:424
static void net_context_set_proto(struct net_context *context, uint16_t proto)
Set context IP protocol for this network context.
Definition: net_context.h:623
#define net_context_setup_pools(context, tx_pool, data_pool)
Set custom network buffer pools for context send operations.
Definition: net_context.h:1151
static uint16_t net_context_get_proto(struct net_context *context)
Get context IP protocol for this network context.
Definition: net_context.h:608
int net_context_get(sa_family_t family, enum net_sock_type type, uint16_t ip_proto, struct net_context **context)
Get network context.
#define NET_CONTEXT_ACCEPTING_SOCK
Definition: net_context.h:63
int net_context_get_option(struct net_context *context, enum net_context_option option, void *value, size_t *len)
Get connection option value for this context.
int net_context_sendto(struct net_context *context, const void *buf, size_t len, const struct sockaddr *dst_addr, socklen_t addrlen, net_context_send_cb_t cb, k_timeout_t timeout, void *user_data)
Send data to a peer specified by address.
static struct net_if * net_context_get_iface(struct net_context *context)
Get network interface for this context.
Definition: net_context.h:640
@ NET_CONTEXT_CONNECTED
Definition: net_context.h:45
@ NET_CONTEXT_IDLE
Definition: net_context.h:40
@ NET_CONTEXT_CONNECTING
Definition: net_context.h:43
@ NET_CONTEXT_READY
Definition: net_context.h:44
@ NET_CONTEXT_UNCONNECTED
Definition: net_context.h:41
@ NET_CONTEXT_CONFIGURING
Definition: net_context.h:42
@ NET_CONTEXT_LISTENING
Definition: net_context.h:46
@ NET_OPT_SNDBUF
Definition: net_context.h:1071
@ NET_OPT_PRIORITY
Definition: net_context.h:1065
@ NET_OPT_RCVTIMEO
Definition: net_context.h:1068
@ NET_OPT_TXTIME
Definition: net_context.h:1066
@ NET_OPT_SNDTIMEO
Definition: net_context.h:1069
@ NET_OPT_SOCKS5
Definition: net_context.h:1067
@ NET_OPT_RCVBUF
Definition: net_context.h:1070
int net_if_get_by_iface(struct net_if *iface)
Get interface index according to pointer.
struct net_if * net_if_get_by_index(int index)
Get interface according to index.
flags
Definition: http_parser.h:131
state
Definition: http_parser_state.h:29
Public kernel APIs.
Public API for network interface.
IPv6 and IPv4 definitions.
Network statistics.
static ZTEST_DMEM int flag
Definition: main.c:26
__INT32_TYPE__ int32_t
Definition: stdint.h:74
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
__INT8_TYPE__ int8_t
Definition: stdint.h:72
Definition: net_ip.h:139
Definition: net_ip.h:151
Definition: kernel.h:2829
Definition: kernel.h:2209
Definition: kernel.h:2721
Kernel timeout type.
Definition: sys_clock.h:65
Definition: net_ip.h:235
Network buffer pool representation.
Definition: buf.h:981
Definition: net_context.h:201
atomic_t refcount
Definition: net_context.h:212
void * user_data
Definition: net_context.h:208
void * fifo_reserved
Definition: net_context.h:204
uint16_t flags
Definition: net_context.h:329
net_context_send_cb_t send_cb
Definition: net_context.h:239
struct sockaddr remote
Definition: net_context.h:226
struct k_mutex lock
Definition: net_context.h:216
struct sockaddr_ptr local
Definition: net_context.h:221
uint8_t ipv4_ttl
Definition: net_context.h:337
struct net_context::@218 options
net_context_connect_cb_t connect_cb
Definition: net_context.h:244
struct net_conn_handle * conn_handler
Definition: net_context.h:229
uint16_t proto
Definition: net_context.h:326
int8_t iface
Definition: net_context.h:332
void * tcp
Definition: net_context.h:258
net_context_recv_cb_t recv_cb
Definition: net_context.h:234
uint8_t ipv6_hop_limit
Definition: net_context.h:336
Network Interface structure.
Definition: net_if.h:480
Network packet.
Definition: net_pkt.h:59
Definition: net_ip.h:344
static const intptr_t user_data[5]
Definition: main.c:588