(usagi-users 03618) question about struct ipv6hdr
Didier Barvaux <[email protected]>
| Newsgroups | gmane.linux.ipv6.usagi.users |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I already posted this question on the netdev ML, but got no answer so
far. Perhaps, people at USAGI could answer it...
As a comment says in include/linux/ipv6.h, the ipv6hdr structure is not
correct. The variables priority and flow_lbl do not match the IPv6
header fields as described in the RFC.
/*
* IPv6 fixed header
*
* BEWARE, it is incorrect. The first 4 bits of flow_lbl
* are glued to priority now, forming "class".
*/
struct ipv6hdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 priority:4,
version:4;
#elif defined(__BIG_ENDIAN_BITFIELD)
__u8 version:4,
priority:4;
#else
#error "Please fix <asm/byteorder.h>"
#endif
__u8 flow_lbl[3];
Is there some specific reason (other than historical one) ?
Didier Barvaux
signature.asc
(application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFEBHMRhK2QMwCOja0RApuJAJ9ud0WIhM+Bg9z5VWwKwHoGaSjVewCcDVuT ldZmdUiyv/KnDzeVRzsC2/0= =wTDS -----END PGP SIGNATURE-----