inet_ntoa_r()--Translate IP Address to Dotted Decimal Format


  Syntax
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>

 int               inet_ntoa_r(struct in_addr internet_address,  
               char *output_buffer,
               int  output_buffer_length)
 
  Service Program Name: Name QSOSRV2

  Default Public Authority: *USE

  Threadsafe: Yes

The inet_ntoa_r() function is used to translate an Internet address from a 32-bit IP address to dotted decimal format.


Authorities and Locks

None.


Parameters

struct in_addr internet_address  (input) 
The 32-bit IP address that is to be converted to dotted decimal format.

char * output_buffer  (input/output) 
The pointer to the buffer that contains the dotted decimal format.

int output_buffer_length  (input) 
The length of the output buffer (length should be at least 16).

Return Value

The inet_ntoa_r() function returns:


Error Conditions

When the inet_ntoa_r() function fails, errno can be set to:

[EINVAL]
Parameter is not valid.

This error code indicates one of the following:



API introduced: V4R2
Top | UNIX-Type APIs | APIs by category