[Oisf-devel] endianness in ICMPV{4,6}Vars
Victor Julien
victor at inliniac.net
Fri Dec 14 09:18:00 UTC 2012
On 12/13/2012 12:09 AM, David Mandelberg wrote:
> Hi,
>
> In p->icmpv4vars and p->icmpv6vars, should integer (MTU in this case)
> values be stored in host or network byte order in them?
This whole part is a bit inconsistent currently. In general the though
it to have _RAW_ macro's that pull things out of the header directly (so
generally these are in network byte order) and non-RAW versions that
convert to host byte order. The vars structure is used to store things
that are the result of calculations or more complicated parsing.
> On a somewhat related note, ICMPV4Vars.mtu is a uint32_t, but I think it
> should be a uint16_t. Also, ICMPV4_GET_MTU() doesn't work because
> icmpv4b isn't a member of ICMPV4Hdr.
Patches are welcome :)
--
---------------------------------------------
Victor Julien
http://www.inliniac.net/
PGP: http://www.inliniac.net/victorjulien.asc
---------------------------------------------
More information about the Oisf-devel
mailing list