www.beck-ipc.com

@CHIP-RTOS C Library V2.00 - 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.

See Also


This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document