in_localaddr Kernel Service

Purpose

Determine whether an IPv4 address is on the local network

Syntax

#include <arpa/inet.h>

int in_localaddr (struct in_addr in)

Parameters

in
Specifies the IPv4 address

Description

Indicates that the IPv4 address in is for a local host (one to which we have a connection). If subnetsarelocal is true, this includes other subnets of the local net. Otherwise, it includes only the directly-connected (sub)nets.

Execution Environment

The in_localaddr kernel service can be called from the process environment only.

Return Values

1
Indicates that the internet address is for a local host (one to which we have a connection). If subnetsarelocal is true, this includes other subnets of the local net. Otherwise, it includes only the directly-connected (sub)nets.