Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ htonl(3) — OSF/1 SILVER Baselevel 4 rev36

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

htons(3)

ntohl(3)

ntohs(3)

htonl(3)  —  Subroutines

OSF

NAME

htonl − Converts an unsigned long (32-bit) integer from host-byte order to Internet network-byte order

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <netinet/in.h> unsigned long hostlong) ;

PARAMETERS

hostlongSpecifies a 32-bit integer in host-byte order. 

DESCRIPTION

The htonl() (host-to-network long) function converts an unsigned long (32-bit) integer from host-byte order to Internet network-byte order. 

The Internet network requires address and port reference data in network-byte order (most significant byte leftmost, least significant byte rightmost). Use the htonl() function to convert address and port long integers from Internet host-byte order to Internet network-byte ordered long integers. 

The htonl() function is defined as a big-endian macro in the netinet/in.h header file for machine environments where network-byte order and host-byte order are identical. 

RETURN VALUES

Upon successful completion, the htonl() function returns a 32-bit long integer in Internet network-byte order. 

RELATED INFORMATION

Functions: htons(3), ntohl(3), ntohs(3)

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