UDP sock definitions. More...
UDP sock definitions.
Definition in file udp.h.
#include <assert.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include "net/af.h"
#include "net/sock.h"
#include "net/ipv4/addr.h"
#include "net/ipv6/addr.h"
#include "sock_types.h"
Go to the source code of this file.
Data Structures | |
struct | sock_udp_aux_rx_t |
Auxiliary data provided when receiving using an UDP sock object. More... | |
struct | sock_udp_aux_tx_t |
Auxiliary data provided when sending using an UDP sock object. More... | |
Typedefs | |
typedef struct _sock_tl_ep | sock_udp_ep_t |
An end point for a UDP sock object. | |
typedef struct sock_udp | sock_udp_t |
Type for a UDP sock object. | |
Functions | |
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. | |
void | sock_udp_close (sock_udp_t *sock) |
Closes a UDP sock object. | |
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_get_remote (sock_udp_t *sock, sock_udp_ep_t *ep) |
Gets the remote end point of a UDP sock object. | |
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. | |
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. | |
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 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. | |
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-continous payload. | |
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. | |
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_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-continous payload. | |
static bool | sock_udp_ep_is_multicast (const sock_udp_ep_t *ep) |
Checks if the IP address of an endpoint is multicast. | |
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. | |