The inet_netof() function is used to extract the network portion of
an IP address.
There are two versions of the API, as shown above. The base IBM® i API uses BSD 4.3
structures and syntax. The other uses syntax and structures compatible with the UNIX 98
programming interface specifications. You can select the UNIX 98 compatible
interface with the _XOPEN_SOURCE macro.
Parameters
internet_address
(Input) The 32-bit IP address from which the network portion of the address
is to be extracted.
Authorities
No authorization is required.
Return Value
inet_netof() returns an integer. Possible values are:
n (where n is the network IP address)
Usage Notes
When you develop in C-based languages and an application is compiled with the _XOPEN_SOURCE
macro defined to the value 520 or greater, the inet_netof() API is mapped to
qso_inet_netof98().
Related Information
_XOPEN_SOURCE--Using _XOPEN_SOURCE for the UNIX 98
compatible interface
inet_lnaof()--Separate Local Portion of IP
Address
inet_makeaddr()--Combine Network Portion and Host
Portion to Make IP Address