@c ----------------------------------------------------------------------
@node ntohl, misc
@heading @code{ntohl}
@subheading Syntax

@example
u_long ntohl(u_long val);
@end example

@subheading 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.

@subheading Return Value

The host-order value.

@subheading Example

@example
ip = htonl(packet.ipaddr);
@end example

@c ----------------------------------------------------------------------
@node ntohs, misc
@heading @code{ntohs}
@subheading Syntax

@example
u_short ntohl(u_short val);
@end example

@subheading Description

This function converts from network formatted shorts to host formatted
shorts.  For the i386 and higher processors, this means that the bytes
are swapped from 12 order to 21 order.

@subheading Return Value

The host-order value.

@subheading Example

@example
port = htons(tcp.port);
@end example

