Subject: [IPFIX] IPFIX bit ordering errata

From: Paul Aitken <[email-masked]>
Date: Tue, 26 Apr 2011 12:21:40 +0100

Dear IPFIXers,

Has anyone implemented an exporter or collector for the following IPFIX 
fields which have errata? :

     isMulticast             (RFC 5102, Section 5.4.22; errata 1736)
     ipv4Options             (RFC 5102, Section 5.8.5;  errata 1737)
     ipv6ExtensionHeaders    (RFC 5102, Section 5.8.6;  errata 1738)
     tcpOptions              (RFC 5102, Section 5.8.8;  errata 1739)

It has been pointed out to me that the above errata are still wrong :-(

In short, not only should the bits within the octets be flipped around 
MSB to LSB (per the existing errata), but the octets themselves should 
also be flipped first-to-last in order to completely reverse the bit 
ordering from what is currently shown.

I believe the figures should be as shown below.

I'd like to check whether anyone else has implemented these fields and 
what bit ordering they've used so we can propose a minimal set of 
changes to get this sorted.

Thanks,
P.

============================================================
1. isMulticast

Since isMulticast is a single octet, I believe the figure in errata 1736 
is correct:

             0      1      2      3      4      5      6      7
          +------+------+------+------+------+------+------+------+
          |   IPv6 multicast scope    |  T   | RES. | RES. | MCv4 |
          +------+------+------+------+------+------+------+------+

============================================================
2. ipv4Options

Per the "IP OPTION NUMBERS" table at
   http://www.iana.org/assignments/ip-parameters
and the table (though not the figure) in section 5.8.5. of RFC 5102,
I believe that the ipv4Options figure should show:

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | |E| | | | |Q|U|D|N|S|R|A|T|E|I|E|V|F|M|M|Z|S|S|R|C|E|T|L|S|N|E|
   | |X| | | | |S|M|P|S|D|T|D|R|I|M|N|I|I|T|T|S|S|I|R|I|-|S|S|E|O|O|
   | |P| | | | | |P|S|A|B|R|D| |P|I|C|S|N|U|U|U|R|D| |P|S| |R|C|P|O|
   | | | | | | | | | |P| |A|E| | |T|O|A|N|R|P| | | | |S|E| | | | |L|
   | | | | | | | | | |A| |L|X| | |D|D| | | | | | | | |O|C| | | | | |
   | | | | | | | | | | | |T|T| | | |E| | | | | | | | | | | | | | | |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   MSB                                                           LSB

Allocation of the undefined bits follows IANA's "IP OPTION NUMBERS" 
registry.

============================================================
3. ipv6ExtensionHeaders

Per the table (though not the figure) in section 5.8.6 of RFC 5102,
I believe that the ipv6ExtensionHeaders figure should show:

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                         |E|A|P|D|H|R|U|F|R|F|R|
   |                 Reserved                |S|H|A|S|O|e|N|R|H|R|e|
   |                                         |P| |Y|T|P|s|K|A| |A|s|
   |                                         | | | | | | | |0| |1| |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   MSB                                                           LSB

============================================================
4. tcpOptions

Per the "TCP Option Kind Numbers" table at
   http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xml
I believe that the tcpOPtions figure should show:

  0     3               4                   6                   6
  0     2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
+-...-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  R  | | |T|T|Q|C| |S|C|R|S|S|M|T|B|S|A|A|C|C|C|P|P|T|R|E|S|S|W|M|N|E|
|  e  | | |C|M|S|O| |N|E|B|N|C|D|C|U|K|C|C|C|C|C|O|O|S|E|C|A|A|S|S|O|O|
|  s  | | |P|O|R|M| |A| | |A|P|5|O|B|T|D|R|E|N|O|S|C|O|P|H|C|C|O|S|P|O|
|  e  | | |A|U|S|P| |P| | | |S| | |B|R| | |C|E|B|P|P|P|L|O|K|K|P| | |L|
|  r  | | |O|T|P| | | | | | | | | |A| | | |H|W|S| | |T|Y| | |P|T| | | |
+-...-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
MSB                                                                 LSB

Allocation of the "Reserved" bits follows IANA's "TCP Option Kind 
Numbers" registry.

============================================================