On Thu, Jan 27, 2000 at 08:29:12AM +0100, Gigi Sullivan wrote:
>       Ok, but what this means ?
...     
>       data = htonl(data);

        It means the result is defined for 32 bit data *only*.
        Calling some variable 'long' does not always mean it
        is *machine* long -- in the  htonl()  (Host TO Network Long)
        it is ALWAYS 32 bits.

>       So my data (on alpha) will lost 4 bytes when I'll do
>       htonl on it ?

        Yes.
        Just because  htonl()/ntohl() are not defined for 64-bit 'long'.

        However do see how RPC's XDR handles 64-bit scalars, that should
        be most educative experience in data portability over the network.

>       Thx a lot :))
> bye bye
>                                               -- gg sullivan
> Lorenzo Cavallaro     `Gigi Sullivan' <[EMAIL PROTECTED]>      -- ITALY

/Matti Aarnio
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to