UDPBind


C Specification

#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 );

Description

UDPBind() assigns the local (source) socket to UDPInfo.

Arguments

info Pointer to UDPInfo to which assign the local socket.
socket A pair of IP address and UDP port number.

Return Values

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.

See Also

IPSocket