Go to the documentation of this file.
19 #ifndef GNRC_SOCK_INTERNAL_H
20 #define GNRC_SOCK_INTERNAL_H
41 #define GNRC_SOCK_DYN_PORTRANGE_MIN (IANA_DYNAMIC_PORTRANGE_MIN)
45 #define GNRC_SOCK_DYN_PORTRANGE_MAX (IANA_DYNAMIC_PORTRANGE_MAX)
50 #define GNRC_SOCK_DYN_PORTRANGE_NUM (GNRC_SOCK_DYN_PORTRANGE_MAX - GNRC_SOCK_DYN_PORTRANGE_MIN + 1)
56 #define GNRC_SOCK_DYN_PORTRANGE_ERR (0)
80 const uint8_t *p = (uint8_t *)&ep->
addr;
81 for (uint8_t i = 0; i <
sizeof(ep->
addr); i++) {
97 memcpy(out, in, in_size);
Includes all essential GNRC network stack base modules.
union sock_ip_ep_t::@290 addr
address
#define assert(cond)
abort the program if assertion is false
GNRC-specific types and function definitions.
ssize_t gnrc_sock_send(gnrc_pktsnip_t *payload, sock_ip_ep_t *local, const sock_ip_ep_t *remote, uint8_t nh)
Send a packet internally.
sock Network protocol registry info
static bool gnrc_netif_highlander(void)
Check if there can only be one gnrc_netif_t interface.
static bool gnrc_af_not_supported(int af)
Internal helper functions for GNRC.
static void gnrc_ep_set(sock_ip_ep_t *out, const sock_ip_ep_t *in, size_t in_size)
Initializes a sock end-point from a given and sets the network interface implicitly if there is only ...
uint16_t netif
stack-specific network interface ID
Representation of a network interface.
ssize_t gnrc_sock_recv(gnrc_sock_reg_t *reg, gnrc_pktsnip_t **pkt, uint32_t timeout, sock_ip_ep_t *remote)
Receive a packet internally.
kernel_pid_t pid
PID of the network interface's thread.
gnrc_nettype_t
Definition of protocol types in the network stack.
Global UNIX address family definitions.
@ AF_INET6
internetwork address family with IPv6: UDP, TCP, etc.
Raw IPv4/IPv6 sock definitions.
gnrc_netif_t * gnrc_netif_iter(const gnrc_netif_t *prev)
Iterate over all network interfaces.
Service Name and Transport Protocol Port Number Registry.
void gnrc_sock_create(gnrc_sock_reg_t *reg, gnrc_nettype_t type, uint32_t demux_ctx)
Create a sock internally.
Type to represent parts (either headers or payload) of a packet, called snips.
Definitions to register network protocol PIDs to use with GNRC communication interface.
static bool gnrc_ep_addr_any(const sock_ip_ep_t *ep)
Check if end point points to any address.
Abstract IP end point and end point for a raw IP sock object.