1.htons
The htons function converts a u_short from host to TCP/IP network byte order (which is big-endian).
u_short htons( u_short hostshort );
Parameters
-
hostshort
- [in] 16-bit number in host byte order.
Return Values
The htons function returns the value in TCP/IP network byte order.Remarks
The htons function takes a 16-bit number in host byte order and returns a 16-bit number in network byte order used in TCP/IP networks.
Requirements
Client: Requires Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.
Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server.
Header: Declared in Winsock2.h.
Library: Use Ws2_32.lib.
2.size_is
Use the [size_is] attribute to specify the size of memory allocated for sized pointers, sized pointers to sized pointers, and single- or multidimensional arrays.
[ size_is(limited-expression-list) ]