Description
Split trafficClassByte into its high six DSCP bits by integer division by four and its low two ECN bits by remainder.
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.
Split trafficClassByte into its high six DSCP bits by integer division by four and its low two ECN bits by remainder.
When to use this tool
Use Network: IPv4 Dscp Ecn Bit Fields when you need to decode or encode one explicit packet field.
How to use the tool and how it works
- Enter trafficClassByte. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Split trafficClassByte into its high six DSCP bits by integer division by four and its low two ECN bits by remainder.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| trafficClassByte | Traffic Class Byte | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.dscp | Dscp | Calculated result member: number. |
| result.ecn | Ecn | Calculated result member: number. |
{
"input": {
"trafficClassByte": 187
},
"output": {
"result": {
"dscp": 46,
"ecn": 3
}
}
} Limitations and assumptions
- Only field values are decoded; no service class or congestion response is inferred.
- 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
Similar or alternative tools
- Network: IPv6 Traffic Class Wire Nibble Pair
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.
- IPv6 Option Action Bits
Decode the top two option-type bits as action and bit five as mutable.