HomeFreeBSD

netinet: Define IPv6 ECN mask

Description

netinet: Define IPv6 ECN mask

Define a mask for the code point used for ECN in the Traffic Class field
(2 bits) of an IPv6 header.

 BE:    0       0       3       0       0       0       0       0
Bit: 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |Version| Traffic Class |           Flow Label                  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                              ...                              |

For BE (Big Endian), or network-byte order, this corresponds to 0x00300000.
For Little Endian, it corresponds to 0x00003000.

Reviewed by: imp, markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/879

(cherry picked from commit b0e13f785b336670bdf39b83a78435b00d00f43c)

Details

Provenance
jlduranAuthored on Oct 28 2023, 2:50 AM
markjCommitted on Jan 11 2024, 2:33 PM
Parents
rG668e777b0a24: setfib.2: Consistently capitalize "FIB"
Branches
Unknown
Tags
Unknown