UCL Common Library Reference |
---|
udp_addr_valid () | |
socket_udp * | udp_init () |
socket_udp * | udp_init_if () |
udp_exit () | |
udp_send () | |
udp_recv () | |
udp_select () | |
udp_fd_zero () | |
udp_fd_set () | |
udp_fd_isset () | |
const | udp_host_addr () |
udp_fd () |
These functions provide a unified interface for sending are receiving UDP datagrams over IPv4 and IPv6 networks.
For IPv6 addresses to work the common library must be built with IPv6
enabled. On UNIX, the configure script has an option --enable-ip-v6
for this purpose. On Win32, there is a project configuration to use
the Microsoft IPv6 stack when installed.
int udp_addr_valid (const
);char *addr
Returns TRUE if addr
is valid, FALSE otherwise.
socket_udp * udp_init (const
,char *addr,
uint16_t rx_port,
uint16_t tx_port);
int ttl
Creates a session for sending and receiving UDP datagrams over IP networks.
socket_udp * udp_init_if (const
,char *addrconst
,char *iface,
uint16_t rx_port,
uint16_t tx_port);
int ttl
Creates a session for sending and receiving UDP datagrams over IP
networks. The session uses iface
as the interface to send and
receive datagrams on.
int udp_send (socket_udp *s
,,
char *buffer);
int buflen
Transmits a UDP datagram containing data from buffer
.
int udp_recv (socket_udp *s
,,
char *buffer);
int buflen
Reads from datagram queue associated with UDP session.
void udp_fd_zero (void
);
Clears file descriptor from set associated with UDP sessions (see select(2)).
void udp_fd_set (socket_udp *s
);
Adds file descriptor associated of s
to set associated with UDP sessions.
int udp_fd_isset (socket_udp *s
);
Checks if file descriptor associated with UDP session is ready for
reading. This function should be called after udp_select()
.
int udp_fd (socket_udp *s
);
This function allows applications to apply their own socketopt()
ioctl()
<<< MD5 | RTP >>> |