gtpc1m3x | Transmission Control Protocol/Internet Protocol |
The htonl function translates a long integer from host byte order to network byte order.
Format
#include <types.h> #include <socket.h> u_long htonl(u_long a);
Normal Return
Returns the translated long integer.
Error Return
None.
Programming Considerations
None.
Examples
The following example converts the information from host byte order to network byte order.
#include <types.h> #include <socket.h>
·
·
·
u_long a; u_long n;
·
·
·
n = htonl(a);
Related Information