inet_addr(3) — Subroutines
OSF
NAME
inet_addr − Translates an Internet network address string to an Internet address integer
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <netinet/in.h>
#include <arpa/inet.h>
unsigned long inet_addr (
char ∗string) ;
PARAMETERS
stringDefines an Internet dot-formatted address character string of the form a.b.c.d, where a, b, c, and d may be expressed as decimal, octal, or hexadecimal integers in the C idiom.
DESCRIPTION
The inet_addr() function translates a dot-formatted Internet character address string to an Internet address integer. The Internet address integer is returned as a network byte-ordered integer (most significant byte leftmost, least significant byte rightmost).
NOTES
On VAX machines, the dot-formatted network-address a.b.c.d is returned as the machine integer dcba.
RETURN VALUES
Upon successful completion, the inet_addr() function returns an equivalent network byte-ordered address integer. Otherwise, -1 is returned.
RELATED INFORMATION
Functions: inet_netof(3), inet_lnaof(3), inet_makeaddr(3), inet_network(3), inet_ntoa(3)