SOInetPtoN


C Specification

#include <dolphin/socket.h>
int SOInetPtoN ( int af, const char* src, void* dst );

Description

SOInetPtoN() converts an address in its standard text presentation into its numeric binary form.

Arguments

af The family of the address (SO_PF_INET for IPv4 or SO_PF_INET6 for IPv6 address family).
src A pointer to the string being passed in. (e.g., ddd.ddd.ddd.ddd (IPv4)or hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh (IPv6))
dst A pointer to a buffer where the function stores the numeric address.

Return Values

1 Succeeded.
0 src is neither a valid IPv4 address notation nor a valid IPv6 address notation.
SO_EAFNOSUPPORT af is neither SO_PF_INET nor SO_PF_INET6.

See Also

SOInetNtoP()