WATTCP API Functions
MVI-ADMNET
♦
'C' Programmable
Ethernet Module
ProSoft Technology, Inc.
Page 83 of 90
December 13, 2006
inet_ntoa
Syntax:
Char * inet_ntoa( char *String, longword IP );
Parameters:
String
Array of character string.
IP
Decimal representation of IP address.
Description:
This function builds ASCII representation of an IP address with a user supply
string from decimal representation of the IP address. The size of the buffer has to
be at least 16 byte.
Return Value:
Pointer to the new string.
Example:
char buffer[ 20 ];
sock_init();
printf("My IP address is %s\n", inet_ntoa( buffer, gethostid()));