@CHIP-RTOS C Library V2.06 - TCP/IP API
htons
Converts a 16 bit word from host to TCP/IP network byte order. unsigned short htons ( unsigned short hostshort ); Parameters
hostshort
- Port number in little endian (PC) byte order
Return Value
- input value returned in network byte order (big endian)
Comments
- This function converts the provided 16 bit value from Intel byte
ordering (little endian) to network byte order (big endian).
This is commonly needed for TCP/IP port number specifications.
No entry into the @CHIP-RTOS API is made here. This action
is taken immediately within this library call.
See Also
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|