Specifications
474
Syntax: CALL "SOCKET.FN3" .fcHToNL HOSTLONG, NETLONG
Description: This function converts a (4-byte) long from host byte order to network byte
order.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API htonl() function.
Parameters:
HOSTLONG Long in host byte order
Return value:
NETLONG Long in network byte order
Syntax:
CALL "SOCKET.FN3" .fcHToNS HOSTSHORT%, NETSHORT%
Description: This function converts a (2-byte) short from host byte order to network byte
order.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API htons() function.
Parameters:
HOSTSHORT% Short in host byte order
Return value:
NETSHORT% Short in network byte order
Syntax:
CALL "SOCKET.FN3" .fcINetAdr IPADDRESS$, ADDRESS
Description: This function converts an Internet address in dotted quad notation to a 4-
byte Internet address.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API inet_addr() function.
Parameters:
IPADDRESS$ Internet address in dotted quad notation
Return value:
ADDRESS 4-byte Internet address
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
.fcHToNL Convert host long (4 bytes) to network byte order
.fcHToNS Convert host short (2 bytes) to network byte order
.fcINetAdr Convert Internet address from dotted quad notation to
32-bit integer
.fcNToHL Convert network long (4 bytes) to host byte order