[Click] Functions htonq and ntohq in <click/integers.hh>
Markku Savela
Markku.Savela at vtt.fi
Thu Oct 11 03:08:38 EDT 2012
On 10/11/2012 09:37 AM, Markku Savela wrote:
> On 10/11/2012 02:45 AM, Eddie Kohler wrote
> Oh well, must have some
> error in my thought process then... will explore more.
Ok, something fishy on the MIPS (Octeon) side of my code
I've in packet payload...
uint64_t in_packets;
and before sending the packet out, I do something like
x.in_packets = htonq(x.in_packets)
when the in_packets is 7, the wireshark shows it as
... 00 00 00 07 00 00 00 00 ...
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.
More information about the click
mailing list