#include <dolphin/ip.h>
typedef struct IPSocket
{
u8 len; // IP_SOCKLEN
u16 family; // IP_INET
u16 port;
u8 addr[IP_ALEN];
} IPSocket;
s32 UDPGetLocalSocket(UDPInfo* info, IPSocket* socket);
UDPGetLocalSocket() gets the local socket (a pair
of IP address and port number) bound to info.
info |
Pointer to UDPInfo to set option. |
socket |
Pointer to IPSocket that receives the local socket. |
IP_ERR_NONE |
Succeeded. |
IP_ERR_INVALID |
info is not a valid UDPInfo. |