home *** CD-ROM | disk | FTP | other *** search
- @node htons, cpu
- @subheading Syntax
-
- @example
- #include <netinet/in.h>
-
- unsigned short htons(unsigned short val);
- @end example
-
- @subheading Description
-
- This function converts from host formatted shorts to network 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 network-order value.
-
- @subheading Example
-
- @example
- tcp.port = htons(port);
- @end example
-
-
-