Skip to content

Main content

Network: IPv6 Traffic Class Wire Nibble Pair Tool

Extract the IPv6 traffic-class octet straddling the first two wire bytes, while retaining adjacent flow-label nibble; version6 is required.

Loading tool…

Description

Join the low nibble of the first byte to the high nibble of the second to form trafficClass; expose the remaining low nibble as flowLabelHighNibble.

Packet headers encode several meanings in fixed-width fields. Bit positions, network byte order, and reserved values must be distinguished from validation of an entire message.

Join the low nibble of the first byte to the high nibble of the second to form trafficClass; expose the remaining low nibble as flowLabelHighNibble.

When to use this tool

Use Network: IPv6 Traffic Class Wire Nibble Pair when you need to decode or encode one explicit packet field.

How to use the tool and how it works

  1. Enter firstHeaderByte, secondHeaderByte. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require version nibble six. Join the low nibble of the first byte to the high nibble of the second to form trafficClass; expose the remaining low nibble as flowLabelHighNibble.1

Input fieldMeaning and unitsAccepted input
firstHeaderByteFirst Header ByteRequired. Safe integer.
secondHeaderByteSecond Header ByteRequired. Safe integer.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.trafficClassTraffic ClassCalculated result member: number.
result.versionVersionCalculated result member: number.
result.flowLabelHighNibbleFlow Label High NibbleCalculated result member: number.
json
{
  "input": {
    "firstHeaderByte": 107,
    "secondHeaderByte": 128
  },
  "output": {
    "result": {
      "trafficClass": 184,
      "version": 6,
      "flowLabelHighNibble": 0
    }
  }
}

Limitations and assumptions

  • Only the first two header bytes are inspected; the complete flow label and packet are not validated.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Inspect the complete captured header and apply the relevant protocol's structural and state rules.

References

  1. Calculation and input contract: network/ipv6-traffic-class-wire-nibble-pair — tool.io

Similar or alternative tools