gtpc1m43Transmission Control Protocol/Internet Protocol

ntohl -- Translate a Long Integer

The ntohl function translates a long integer from network byte order to host byte order.

Format

#include  <types.h>
#include  <socket.h>
u_long    ntohl(u_long a);

a
Unsigned long integer to be put into host byte order.

Normal Return

Returns the translated long integer.

Error Return

None.

Programming Considerations

None.

Examples

The following example converts the information from network byte order to host byte order.

#include <types.h>
#include <socket.h>

·
·
·
u_long a; u_long n;
·
·
·
n = ntohl(a);

Related Information