inet_lnaof()

The inet_lnaof() call returns the local network portion of an internet host address.

Syntax

#include <types.h>
#include <arpa\inet.h>
u_long inet_lnaof(in)
struct in_addr in;

Parameters

in

Description

The inet_lnaof() call 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() call processes any other class of address as a Class C address.

Return Values

The local network address is returned in host-byte order. The return value points to static data that subsequent API calls can modify.

The return values of the inet_lnaof() call depend on the class of internet address the application provides:

Class A

Class B Class C

Related Calls


[Back: inet_addr()]
[Next: inet_makeaddr()]