www.delorie.com/djgpp/doc/libc/libc_598.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

ntohl

Syntax

 
#include <netinet/in.h>

unsigned long ntohl(unsigned long val);

Description

This function converts from network formatted longs to host formatted longs. For the i386 and higher processors, this means that the bytes are swapped from 1234 order to 4321 order.

Return Value

The host-order value.

Portability

ANSI/ISO C No
POSIX No

Example

 
ip = ntohl(packet.ipaddr);


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004