Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inet_addr(3) — OSF/1 3.0 αXP

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

inet_netof(3)

inet_lnaof(3)

inet_makeaddr(3)

inet_network(3)

inet_ntoa(3)

inet_addr(3)  —  Subroutines

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 int 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

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, it returns the unsigned int form of the constant INADDR_NONE (-1). 

RELATED INFORMATION

Functions: inet_netof(3), inet_lnaof(3), inet_makeaddr(3), inet_network(3), inet_ntoa(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026