The IP utility library module has the file name ip.c. This module provides IP addressing routines. The Unix version of this API uses the TCP Berkeley socket interprocess communication method. The Windows version of this API uses the Winsock interprocess communication method.
Since the Future Lab QNX platform software does not use TCP for interprocess communication (QNX native message passing is the IPC method), this module is not available for QNX.
Here is a list of functions in the IP utility library module:
The following modules are required along with this module:
Just make sure you compile and link this module along with the other required modules.
This module requires the header files:
Prototype : int ip_host2ip(char *hostname, char *ipaddr)
Parameters :
Name : hostname
Description: host name
Name : ipaddr
Description: returned IP address
Returns : TRUE upon success, FALSE otherwise
This function will resolve hostname to an IP address. Upon success, the IP address will be loaded into ipaddr.
Prototype : int ip_ip2host(char *ipaddr, char *hostname)
Parameters :
Name : ipaddr
Description: IP address
Name : hostname
Description: returned host name
Returns : TRUE upon success, FALSE otherwise
This function will resolve ipaddr to a host name. Upon success, the host name will be loaded into hostname.
Prototype : int isip(char *str)
Parameters :
Name : str
Description : input string
Returns : TRUE upon success, FALSE otherwise
This function tests a string to see if it is a valid TCP/IP address. The string is checked for the presence of four period delimited words each consisting of a number between zero and 255.