Re: Functions htonq and ntohq in <click/integers.hh>

Eddie Kohler <[email protected]> Thu, 11 Oct 2012 11:43:29 -0400
Newsgroups gmane.network.routing.click
Message-ID <CAF0C5SJQ768eYzQ+yvVn-bJMe7ZHut=FYSTBGX7fbHT6AhLSVQ@mail.gmail.com>
Ouch! Does the diff I just checked in work for you?

E


On Thu, Oct 11, 2012 at 4:02 AM, Markku Savela <[email protected]> wrote:
> On 10/11/2012 10:08 AM, Markku Savela wrote:
>
>> Apparently MIPS in big endian mode and calling htonq is not
>> correct. I was using htonq in same sense as "htonl", which
>> always works, whether host is big or little endian.
>
>
> If anyone is insterested, following diff is my attempt to make
> htonq/ntohq safe to call regardless of the host endianness?
> (works for my MIPS -> x86 case, but of course, these things
> are tricky, so some one needs to check this, or think a
> better implementation).
>
>
>