Embedded TCP/IP stack: fnet_inet_ptos

FNET

Embedded TCP/IP stack  4.1.0
fnet_return_t fnet_inet_ptos ( const fnet_char_t str,
struct fnet_sockaddr addr 
)

Converts IPv4 and IPv6 addresses from text to socket-address structure.

Parameters
strNull-terminated character string that contains the text representation of the IP address to convert to socket-address structure. The sa_port is set to zero.
addrPointer to a socket-address structure to be filled.
Returns
This function returns:
  • FNET_OK if no error occurs.
  • FNET_ERR if the string in the str parameter does not contain a legitimate Internet address.
See also
fnet_inet_pton()

This function converts the character string src into a socket-address structure.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net