
Chapter 17. TCP/IP
395
Function #11 .fcNToHL
Convert network long (4 bytes) to host byte order
Syntax: CALL "SOCKET.FN3" .fcNToHL NETLONG, HOSTLONG
Description:
This function converts a (4-byte) long from network byte to host byte
order.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API ntohl() function.
Parameters: NETLONG Long in network byte order
Return value: HOSTLONG Long in host byte order
Function #12 .fcNToHS
Convert network short (2 bytes) to host byte order
Syntax: CALL "SOCKET.FN3" .fcNToHS NETSHORT%, HOSTSHORT%
Description:
This function converts a (2-byte) short from network byte order to host
byte order.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API ntohs() function.
Parameters: NETSHORT% Short in network byte order
Return value: HOSTSHORT% Short in host byte order
Kommentare zu diesen Handbüchern