SOInetPtoN

Syntax

#include <cafe.h>
#include <cafe/network.h>

int SOInetPtoN(int af, const char *src, void *dst);

Parameters

af Address family.
  • AF_INET...IPv4 address family.
src Address to convert.
  • For AF_INET, this should be in dotted-quad format: "ddd.ddd.ddd.ddd"
dst Destination of the converted address.
  • For AF_INET, the address is converted to an in_addr structure and copied to dst, which should point to a structure of size sizeof(struct in_addr) bytes.

Return Values

Positive value upon success. A negative value is returned and errno is set to SO_EAFNOSUPPORT if af is invalid. 0 is returned if src is invalid.

Description

Converts the character string src into a network address having a structure as specified by the address family af. The resulting address is written to dst.

Do Not Call From

Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

See Also

SOInetAtoN
SOInetNtoA
SOInetNtoA_r
SOInetNtoP

Revision History

2012/08/16 Cleanup pass.
2011/07/12 Additional clarification of arguments.
2011/06/07 Modify description about return values.
2011/02/21 Initial version.


CONFIDENTIAL