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