#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/netif.h"
#include "lwip/ip_addr.h"
#include "lwip/ip.h"
Classes | |
struct | udp_hdr |
struct | udp_pcb |
Defines | |
#define | UDP_HLEN 8 |
#define | UDP_FLAGS_NOCHKSUM 0x01U |
#define | UDP_FLAGS_UDPLITE 0x02U |
#define | UDP_FLAGS_CONNECTED 0x04U |
#define | UDP_FLAGS_MULTICAST_LOOP 0x08U |
#define | udp_flags(pcb) ((pcb)->flags) |
#define | udp_setflags(pcb, f) ((pcb)->flags = (f)) |
#define | udp_init() |
#define | udp_debug_print(udphdr) |
Typedefs | |
typedef void(* | udp_recv_fn )(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) |
Function prototype for udp pcb receive callback functions addr and port are in same byte order as in the pcb The callback is responsible for freeing the pbuf if it's not used any more. | |
Functions | |
struct udp_pcb * | udp_new (void) |
void | udp_remove (struct udp_pcb *pcb) |
err_t | udp_bind (struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) |
err_t | udp_connect (struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) |
void | udp_disconnect (struct udp_pcb *pcb) |
void | udp_recv (struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) |
err_t | udp_sendto_if (struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) |
err_t | udp_sendto (struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port) |
err_t | udp_send (struct udp_pcb *pcb, struct pbuf *p) |
void | udp_input (struct pbuf *p, struct netif *inp) |
Variables | |
PACK_STRUCT_BEGIN struct udp_hdr | PACK_STRUCT_STRUCT |
struct udp_pcb * | udp_pcbs |
#define udp_debug_print | ( | udphdr | ) |
#define udp_flags | ( | pcb | ) | ((pcb)->flags) |
#define UDP_FLAGS_CONNECTED 0x04U |
#define UDP_FLAGS_MULTICAST_LOOP 0x08U |
#define UDP_FLAGS_NOCHKSUM 0x01U |
#define UDP_FLAGS_UDPLITE 0x02U |
#define UDP_HLEN 8 |
#define udp_init | ( | ) |
#define udp_setflags | ( | pcb, | ||
f | ||||
) | ((pcb)->flags = (f)) |
typedef void(* udp_recv_fn)(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) |
Function prototype for udp pcb receive callback functions addr and port are in same byte order as in the pcb The callback is responsible for freeing the pbuf if it's not used any more.
ATTENTION: Be aware that 'addr' points into the pbuf 'p' so freeing this pbuf makes 'addr' invalid, too.
arg | user supplied argument (udp_pcb.recv_arg) | |
pcb | the udp_pcb which received data | |
p | the packet buffer that was received | |
addr | the remote IP address from which the packet was received | |
port | the remote port from which the packet was received |
void udp_disconnect | ( | struct udp_pcb * | pcb | ) |
struct udp_pcb* udp_new | ( | void | ) | [read] |
void udp_recv | ( | struct udp_pcb * | pcb, | |
udp_recv_fn | recv, | |||
void * | recv_arg | |||
) |
void udp_remove | ( | struct udp_pcb * | pcb | ) |
err_t udp_sendto_if | ( | struct udp_pcb * | pcb, | |
struct pbuf * | p, | |||
ip_addr_t * | dst_ip, | |||
u16_t | dst_port, | |||
struct netif * | netif | |||
) |
PACK_STRUCT_BEGIN struct udp_hdr PACK_STRUCT_STRUCT |