277 #include <sys/types.h> 
  281 #if defined (__clang__) 
  282 # pragma clang diagnostic push 
  283 # pragma clang diagnostic ignored "-Wtypedef-redefinition" 
  305 #if defined (__clang__) 
  306 # pragma clang diagnostic pop 
  313 #if defined(MODULE_SOCK_AUX_LOCAL) || defined(DOXYGEN) 
  321 #if defined(MODULE_SOCK_AUX_TIMESTAMP) || defined(DOXYGEN) 
  329 #if defined(MODULE_SOCK_AUX_RSSI) || defined(DOXYGEN) 
  337 #if defined(MODULE_SOCK_AUX_TTL) || defined(DOXYGEN) 
  352 #if defined(MODULE_SOCK_AUX_LOCAL) || defined(DOXYGEN) 
  360 #if defined(MODULE_SOCK_AUX_TIMESTAMP) || defined(DOXYGEN) 
  533                                     void *data, 
size_t max_len,
 
  630                                         void **data, 
void **buf_ctx,
 
  710                                         const void *data, 
size_t len,
 
  757                                     const void *data, 
size_t len,
 
  836 #if !defined(SOCK_HAS_IPV6) 
  839 #elif !defined(SOCK_HAS_IPV4) 
  847 #include "sock_types.h" 
Global UNIX address family definitions.
 
POSIX.1-2008 compliant version of the assert macro.
 
#define assert(cond)
abort the program if assertion is false
 
@ AF_INET6
internetwork address family with IPv6: UDP, TCP, etc.
 
@ AF_INET
internetwork address family: UDP, TCP, etc.
 
static bool ipv4_addr_is_multicast(const ipv4_addr_t *addr)
Check if addr is a multicast address.
 
static bool ipv6_addr_is_multicast(const ipv6_addr_t *addr)
Check if addr is a multicast address.
 
ssize_t sock_udp_recv_aux(sock_udp_t *sock, void *data, size_t max_len, uint32_t timeout, sock_udp_ep_t *remote, sock_udp_aux_rx_t *aux)
Receives a UDP message from a remote end point.
 
int sock_udp_get_local(sock_udp_t *sock, sock_udp_ep_t *ep)
Gets the local end point of a UDP sock object.
 
int sock_udp_create(sock_udp_t *sock, const sock_udp_ep_t *local, const sock_udp_ep_t *remote, uint16_t flags)
Creates a new UDP sock object.
 
static bool sock_udp_ep_is_v6(const sock_udp_ep_t *ep)
Checks if the IP address of an endpoint is an IPv6 address.
 
ssize_t sock_udp_sendv_aux(sock_udp_t *sock, const iolist_t *snips, const sock_udp_ep_t *remote, sock_udp_aux_tx_t *aux)
Sends a UDP message to remote end point with non-continuous payload.
 
static ssize_t sock_udp_recv_buf(sock_udp_t *sock, void **data, void **buf_ctx, uint32_t timeout, sock_udp_ep_t *remote)
Provides stack-internal buffer space containing a UDP message from a remote end point.
 
static ssize_t sock_udp_send_aux(sock_udp_t *sock, const void *data, size_t len, const sock_udp_ep_t *remote, sock_udp_aux_tx_t *aux)
Sends a UDP message to remote end point.
 
int sock_udp_get_remote(sock_udp_t *sock, sock_udp_ep_t *ep)
Gets the remote end point of a UDP sock object.
 
static ssize_t sock_udp_sendv(sock_udp_t *sock, const iolist_t *snips, const sock_udp_ep_t *remote)
Sends a UDP message to remote end point with non-continuous payload.
 
void sock_udp_close(sock_udp_t *sock)
Closes a UDP sock object.
 
ssize_t sock_udp_recv_buf_aux(sock_udp_t *sock, void **data, void **buf_ctx, uint32_t timeout, sock_udp_ep_t *remote, sock_udp_aux_rx_t *aux)
Provides stack-internal buffer space containing a UDP message from a remote end point.
 
static bool sock_udp_ep_is_multicast(const sock_udp_ep_t *ep)
Checks if the IP address of an endpoint is multicast.
 
static ssize_t sock_udp_send(sock_udp_t *sock, const void *data, size_t len, const sock_udp_ep_t *remote)
Sends a UDP message to remote end point.
 
static ssize_t sock_udp_recv(sock_udp_t *sock, void *data, size_t max_len, uint32_t timeout, sock_udp_ep_t *remote)
Receives a UDP message from a remote end point.
 
uint8_t sock_aux_flags_t
Type holding the flags used to request specific auxiliary data.
 
IPv4 address type and helper functions definitions.
 
Definitions for IPv6 addresses.
 
Common sock API definitions.
 
Common IP-based transport layer end point.
 
int family
family of sock_ip_ep_t::addr
 
uint8_t ipv4[4]
IPv4 address mode.
 
union _sock_tl_ep::@390 addr
address
 
uint8_t ipv6[16]
IPv6 address mode.
 
iolist structure definition
 
Auxiliary data provided when receiving using an UDP sock object.
 
sock_udp_ep_t local
The local endpoint the datagram was received on.
 
uint8_t ttl
TTL value of the received frame.
 
int16_t rssi
RSSI value of the received frame.
 
uint64_t timestamp
System time the datagram was received.
 
sock_aux_flags_t flags
Flags used request information.
 
Auxiliary data provided when sending using an UDP sock object.
 
uint64_t timestamp
System time the datagram was send.
 
sock_udp_ep_t local
The local endpoint from which the datagram will be sent.
 
sock_aux_flags_t flags
Flags used request information.
 
Data type to represent an IPv4 address.
 
Data type to represent an IPv6 address.