Subject: htonq
To: None <,,>
From: Julian Assange <>
List: tech-userlevel
Date: 03/03/1999 12:30:40
I notice that there is some add-hackery going on in relation to usage
of network byte order 64 bit quantities (e.g file offsets in ufs and
nfs). Can we define a standard way (both from kernel and userland) of
moving 64 bit quantities to and from network byte order. e.g:

#ifndef WORDS_BIGENDIAN /* i.e. if (little endian) */
#define htonq(x) (((u_64)htonl((x)>>32))|(((u_64)htonl(x))<<32))
#define ntohq(x) htonq(x)
#define htonq(x) ((u_64)(x))
#define ntohq(x) ((u_64)(x))

#endif /* HTONQ_H */