#include <dolphin/ip.h>
typedef struct IPSocket
{
u8 len; // IP_SOCKLEN
u8 family; // IP_INET
u16 port;
u8 addr[IP_ALEN];
} IPSocket;
s32 UDPBind ( UDPInfo* info, const IPSocket* socket );
UDPBind() assigns the local (source) socket to UDPInfo.
info |
Pointer to UDPInfo to which assign the local socket. |
socket |
A pair of IP address and UDP port number. |
IP_ERR_NONE |
Succeeded. |
IP_ERR_INV_SOCKET |
Specified socket address is not valid. |
IP_ERR_EXIST |
Specified socket is already in use. |
IP_ERR_INVALID |
info is not a valid UDPInfo.
Specified socket is not valid. |