The friendly Operating System for the Internet of Things
sock/udp.h File Reference

UDP sock definitions. More...

Detailed Description

#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include "net/sock.h"
#include "sock_types.h"
+ Include dependency graph for sock/udp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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. More...
 

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. More...
 
void sock_udp_close (sock_udp_t *sock)
 Closes a UDP sock object. More...
 
int sock_udp_get_local (sock_udp_t *sock, sock_udp_ep_t *ep)
 Gets the local end point of a UDP sock object. More...
 
int sock_udp_get_remote (sock_udp_t *sock, sock_udp_ep_t *ep)
 Gets the remote end point of a UDP sock object. More...
 
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. More...
 
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. More...