Linux-Hams archive - March 1997: Re: ntohl and htnol: Why bother?
Re: ntohl and htnol: Why bother?
Matthias Welwarsky (kvwpwl.hjvdzlqwwm@stoekergroup.com)
Sun, 02 Mar 1997 16:08:46 +0100
oxsqws.ymfqtmnep@swarthmore.edu wrote:
> Is it worth my while "doing the right thing" and having lots of ntohl()'s in
> my receive functions and lots of htonl()'s in my outgoing ones or should I
> just not worry about it and use net byte order internally.
>
You can use network byte order if you don't need to do
computations/comparisons/thelike with the data. In fact this is rather
clever and makes things more portable. However, usually you *do*
computations/comparisons/thelike with the data :-)
--
73s de Matthias