Zephyr API 3.6.99
|
Note that we do not store the actual source IP address in the context because the address is already be set in the network interface struct. More...
#include <net_context.h>
Data Fields | ||
void * | fifo_reserved | |
First member of the structure to allow to put contexts into a FIFO. | ||
void * | user_data | |
User data associated with a context. | ||
atomic_t | refcount | |
Reference count. | ||
struct k_mutex | lock | |
Internal lock for protecting this context from multiple access. | ||
struct sockaddr_ptr | local | |
Local endpoint address. | ||
struct sockaddr | remote | |
Remote endpoint address. | ||
struct net_conn_handle * | conn_handler | |
Connection handle. | ||
net_context_recv_cb_t | recv_cb | |
Receive callback to be called when desired packet has been received. | ||
net_context_send_cb_t | send_cb | |
Send callback to be called when the packet has been sent successfully. | ||
net_context_connect_cb_t | connect_cb | |
Connect callback to be called when a connection has been established. | ||
void * | tcp | |
TCP connection information. | ||
struct { | ||
} | options | |
Option values. | ||
uint16_t | proto | |
Protocol (UDP, TCP or IEEE 802.3 protocol value) | ||
uint16_t | flags | |
Flags for the context. | ||
int8_t | iface | |
Network interface assigned to this context. | ||
union { | ||
struct { | ||
uint8_t ipv6_hop_limit | ||
IPv6 hop limit. More... | ||
uint8_t ipv6_mcast_hop_limit | ||
IPv6 multicast hop limit. More... | ||
} | ||
struct { | ||
uint8_t ipv4_ttl | ||
IPv4 TTL. More... | ||
uint8_t ipv4_mcast_ttl | ||
IPv4 multicast TTL. More... | ||
} | ||
}; | ||
IPv6 hop limit or IPv4 ttl for packets sent via this context. | ||
Note that we do not store the actual source IP address in the context because the address is already be set in the network interface struct.
If there is no such source address there, the packet cannot be sent anyway. This saves 12 bytes / context in IPv6.
union { ... } net_context |
IPv6 hop limit or IPv4 ttl for packets sent via this context.
struct net_conn_handle* net_context::conn_handler |
Connection handle.
net_context_connect_cb_t net_context::connect_cb |
Connect callback to be called when a connection has been established.
void* net_context::fifo_reserved |
First member of the structure to allow to put contexts into a FIFO.
uint16_t net_context::flags |
Flags for the context.
int8_t net_context::iface |
Network interface assigned to this context.
uint8_t net_context::ipv4_mcast_ttl |
IPv4 multicast TTL.
uint8_t net_context::ipv4_ttl |
IPv4 TTL.
uint8_t net_context::ipv6_hop_limit |
IPv6 hop limit.
uint8_t net_context::ipv6_mcast_hop_limit |
IPv6 multicast hop limit.
struct sockaddr_ptr net_context::local |
Local endpoint address.
Note that the values are in network byte order.
struct k_mutex net_context::lock |
Internal lock for protecting this context from multiple access.
struct { ... } net_context::options |
Option values.
uint16_t net_context::proto |
Protocol (UDP, TCP or IEEE 802.3 protocol value)
net_context_recv_cb_t net_context::recv_cb |
Receive callback to be called when desired packet has been received.
atomic_t net_context::refcount |
Reference count.
struct sockaddr net_context::remote |
Remote endpoint address.
Note that the values are in network byte order.
net_context_send_cb_t net_context::send_cb |
Send callback to be called when the packet has been sent successfully.
void* net_context::tcp |
TCP connection information.
void* net_context::user_data |
User data associated with a context.