NETUTIL(3) Xinu Programmer's Manual NETUTIL(3) NAME netutil - Network utilities hs2net, net2hs, hl2net, net2hl, vax2hl, hl2vax SYNOPSIS short net2hs(s) short hs2net(s) long net2hl(l) long hl2net(l) long vax2hl(l) long hl2vax(l) short s; long l; DESCRIPTION These routines map binary integer data between network stan- dard byte order and local host byte order. In the descrip- tion, the term _s_h_o_r_t refers to a 2-octet (16-bit) binary value, whether two's complement signed or unsigned, and the term _l_o_n_g _r_e_f_e_r_s _t_o _a _4-_o_c_t_e_t (_3_2-_b_i_t) _v_a_l_u_e. _T_h_e _i_n_d_i_v_i_- _d_u_a_l _r_o_u_t_i_n_e_s _a_r_e: net2hs Converts a short item from network byte order to host byte order. hs2net Converts a short item from host byte order to network byte order. net2hl Converts a long item from network byte order to host byte order. hl2net Converts a long item from host byte order to network byte order. vax2hl Converts a long item from VAX byte order to host byte order (used in communication with a file server running on a VAX). hl2vax Converts a long from host byte order to VAX byte order (used in communication with a file server running on a VAX). No conversion is needed for character strings because the local host order on most machines agrees with network stan- dard byte order (i.e., the string extends upward in the Version 6b Printed 1/12/87 1 NETUTIL(3) Xinu Programmer's Manual NETUTIL(3) memory address space). Version 6b Printed 1/12/87 2