![]() |
![]()
| ![]() |
![]()
NAMEsocket_recv6 - receive a UDP datagram SYNTAX#include <libowfat/socket.h> ssize_t socket_recv6(int s, char* buf, size_t
len,
DESCRIPTIONsocket_recv6 receives up to len bytes starting at buf from a UDP datagram coming in on the socket s. It writes the UDP port to port and the IP address to ip, and returns the number of bytes actually received (or -1 if anything went wrong). For link-local addresses, scope_id will become the network interface number, which can be translated into the name of the interface ("eth0") with socket_getifname. RETURN VALUEsocket_recv6 returns the number of bytes in the datagram if one was received. If not, it returns -1 and sets errno appropriately. EXAMPLE#include <libowfat/socket.h>
SEE ALSOsocket_recv4(3), socket_getifname(3)
|