SOInetNtoP

Syntax

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

const char *SOInetNtoP(
                       int af, 
                       const void *src, 
                       char *dst, 
                       socklen_t size
                      );

Parameters

af Address family.
  • AF_INET...IPv4 address family.
src Address to convert.
dst Destination buffer for the converted address.
size Length of the converted address in bytes.

Return Values

A pointer to dst upon success. If af is invalid, NULL is returned and errno is set to SO_EAFNOSUPPORT.

Description

Parses the network address src from the network format (e.g., in_addr structure or another binary format, in network byte order) in the specified address family af, and converts it into a string.

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

Revision History

2012/08/16 Cleanup pass.
2011/06/07 Modify description about return values.
2011/02/21 Initial version.


CONFIDENTIAL