htonl()

convert 32-bit values between host and network byte order 

Function


SYNOPSIS

#include <machine/endian.h>

unsigned long htonl(unsigned long hostlong);


DESCRIPTION

This subroutine converts values between the host and network byte order. Specifically, htonl() converts 32-bit (4-byte) quantities from host byte order to network byte order.


PARAMETERS

hostlong 

Specifies the 32-bit host quantity.


RETURN VALUES

htonl() returns the network byte order of hostlong.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

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


PTC MKS Toolkit 10.4 Documentation Build 39.