Returns the host ID of an Internet address.
Standard C Library (libc.a)
#include <sys/socket.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h>
int inet_Inaof (InternetAddr) struct in_addr InternetAddr;
The inet_lnaof subroutine masks off the host ID of an Internet address based on the Internet address class. The calling application must enter the Internet address as an unsigned long value.
Note: The application must verify that the network and host IDs for the Internet address conform to either a Class A, B, or C Internet address. The inet_lnaof subroutine processes any other number as a Class C address.
|InternetAddr||Specifies the Internet address to separate.|
The return values of the inet_lnaof subroutine depend on the class of Internet address the application provides:
|Class A||The logical product of the Internet address and 0x00FFFFFF.|
|Class B||The logical product of the Internet address and 0x0000FFFF.|
|Class C||The logical product of the Internet address and 0x000000FF.|
The inet_Inaof subroutine is part of Base Operating System (BOS) Runtime.
All applications containing the inet_lnaof subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.
|Contains host names.|
The endhostent subroutine, endnetent subroutine, gethostbyaddr subroutine, gethostbyname subroutine, getnetbyaddr subroutine, getnetbyname subroutine, getnetent subroutine, inet_addr subroutine, inet_makeaddr subroutine, inet_netof subroutine, inet_network subroutine, inet_ntoa subroutine, sethostent subroutine. setnetent subroutine.
Sockets Overview and Understanding Network Address Translation in AIX Version 4.3 Communications Programming Concepts.