#include <netinet/in.h> unsigned long ntohl(unsigned long val);
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.
The host-order value.
ANSI, POSIX
ip = ntohl(packet.ipaddr);
Go to the first, previous, next, last section, table of contents.