NetBurner 3.5.6
PDF Version |
NetBurner User Datagram Protocol (UDP) Comprehensive API. More...
Go to the source code of this file.
Classes | |
class | UDPPacket |
UDP Packet Class - Complete UDP packet management. More... | |
Macros | |
#define | UDP_ERR_NOSUCH_SOCKET (-1) |
Socket does not exist. | |
#define | UDP_ERR_NOTOPEN_TO_WRITE (-2) |
Socket not open for write. | |
#define | UDP_ERR_NOTOPEN_TO_READ (-3) |
Socket not open for read. | |
Typedefs | |
typedef void | udp_data_notify(OS_FIFO *pfifo, uint16_t port) |
UDP packet arrival notification callback function type. | |
Functions | |
bool | RegisterUDPFifo (uint16_t listenPort, OS_FIFO *pFifo) |
Register FIFO to receive UDP packets on specified port. | |
bool | RegisterUDPFifoVia (uint16_t listenPort, OS_FIFO *pFifo, int interface) |
Register FIFO to receive UDP packets on specified port via specific network interface. | |
uint16_t | RegisterEphemeralFifo (OS_FIFO *pfifo, int ifn=-1) |
Register UDP FIFO on a random unused ephemeral port. | |
bool | RegisterUDPFifoWithNotify (uint16_t listenPort, OS_FIFO *pFifo, udp_data_notify *pNotifyFunction) |
Register UDP FIFO with callback notification on packet arrival. | |
bool | RegisterUDPFifoWithNotifyVia (uint16_t listenPort, OS_FIFO *pFifo, udp_data_notify *pNotifyFunction, int interface) |
Register UDP FIFO with callback notification on specific network interface. | |
void | UnregisterUDPFifo (uint16_t listenPort, bool drain=false) |
Unregister UDP FIFO and stop receiving packets on specified port. | |
int | CreateRxUdpSocket (uint16_t listening_port) |
Create receive-only UDP socket bound to specified port. | |
int | CreateTxUdpSocket (const IPADDR &send_to_addr, uint16_t remote_port, uint16_t local_port) |
Create transmit-only UDP socket for sending to specified destination. | |
int | CreateRxTxUdpSocket (const IPADDR &send_to_addr, uint16_t send_to_remote_port, uint16_t local_port) |
Create bidirectional UDP socket for both sending and receiving. | |
int | sendto (int sock, puint8_t what_to_send, int len_to_send, const IPADDR &to_addr, uint16_t remote_port) |
Send UDP packet through socket to specified destination. | |
int | sendtovia (int sock, puint8_t what_to_send, int len_to_send, const IPADDR &to_addr, uint16_t remote_port, int intfnum) |
Send via specific interface. | |
int | recvfrom (int sock, puint8_t buffer, int len, IPADDR *pAddr, uint16_t *pLocal_port, uint16_t *pRemote_port) |
Receive UDP packet from socket with sender information. | |
int | SendFragmentedUdpPacket (const IPADDR &to, uint16_t source_port, uint16_t dest_port, puint8_t data, int length) |
Send large UDP packet (>MTU) with IP fragmentation. | |
NetBurner User Datagram Protocol (UDP) Comprehensive API.
This header provides a complete UDP implementation for NetBurner embedded devices, supporting both IPv4 and IPv6 protocols with dual API design for maximum flexibility.
1. Object-Oriented C++ Interface (UDPPacket Class)
2. BSD-Style Socket Functions