>
>
> Depending upon what the platform of your host computer is there
> are some simple untility in unix called:
>
> htonl, htons, ntohl, ntohs
>
>
> check out the "man pages":
>
> "htonl, htons, ntohl, ntohs - convert values between host
> and network byte order
>
> ...
I would like to call the ROOTTALK attention those subroutines do not take in account
8 bytes. This means they are no use for "double" and 64-bits int and 64-bits pointers.
And the main obstacle - one must write the piece of code and must know in advance what
the "type" of the next byte of his/her binary format. Does it belong "char", "short", "long" or
"double" to select the proper conversion subroutine ?
Valery
>
>
> On the i80x86 the host byte order is Least Significant
> Byte first, whereas the network byte order, as used on the
> Internet, is Most Significant Byte first."
>
> I hope this helps.
>
> Tim Smith
>
>
> _____________________________________________________________________
> Timothy Paul Smith Research Scientist
> MIT Bates Lab tim_smith@mit.edu
> 21 Manning Rd. tel: (617) 253-9207
> Middleton, MA 01949 fax: (617) 253-9599
>
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:34 MET