ntohll Subroutine

Purpose

Converts an unsigned long integer from Internet network standard byte order to host byte order.

Library

ISODE Library (libisode.a)

Syntax

#include <sys/types.h>
#include <netinet/in.h>

uint64_t ntohll ( NetLong)
uint64_t NetLong;

Description

The ntohll subroutine converts an unsigned long (64-bit) integer from Internet network standard byte order to host byte order.

Receiving hosts require addresses and ports in host byte order. Use the ntohll subroutine to convert Internet addresses and ports to the host integer representation.

The ntohll subroutine is defined in the net/nh.h file as a null macro if the host byte order is the same as the network byte order.

The ntohll subroutine is declared in the net/nh.h file as a function if the host byte order is not the same as the network byte order.

All applications containing the ntohll subroutine must be compiled with the _BSD macro set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.

Parameters

Item Description
NetLong Requires a 64-bit integer in network byte order.

Return Values

The ntohll subroutine returns a 64-bit integer in host byte order.