inet_netof(3) — Subroutines
OSF
NAME
inet_netof − Translates an Internet address integer into its network address component
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <netinet/in.h> #include <arpa/inet.h> u_long inet_netof(
struct in_addr net_addr) ;
PARAMETERS
net_addrDefines an Internet address in network-byte order. May be expressed as octal (leading 0), hexadecimal (leading 0x or 0X), or decimal.
DESCRIPTION
The inet_netof() function translates an Internet address into its network address component. The network address integer is returned in network-byte order (most significant byte leftmost, least significant byte rightmost).
RETURN VALUES
Upon successful completion, the inet_netof() function returns a network byte-ordered integer that specifies the Internet network address. When the inet_netof() function fails, -1 is returned.