Skip to content

Main content

Ethernet Preamble Included Length Flag Tool

Account for seven preamble octets and one start-frame delimiter; interpacket gap is excluded.

Loading tool…

Description

Subtract eight bytes when reportedBytes includes preamble and SFD, otherwise retain it as frameBytes.

A wire-format length may count headers, payload, padding, or only part of an enclosing message. Offsets and exclusive ends must use a clearly stated byte convention.

Subtract eight bytes when reportedBytes includes preamble and SFD, otherwise retain it as frameBytes.

When to use this tool

Use Ethernet Preamble Included Length Flag when you need a field-level byte count or boundary check.

How to use the tool and how it works

  1. Enter reportedBytes, includesPreambleAndSfd. 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 frameBytes, wireBytesBeforeGap. Use the output convention below.

Subtract eight bytes when reportedBytes includes preamble and SFD, otherwise retain it as frameBytes. Return wireBytesBeforeGap with those eight bytes included.1

Input fieldMeaning and unitsAccepted input
reportedBytesReported BytesRequired. Safe integer; minimum 0.
includesPreambleAndSfdIncludes Preamble And SfdRequired. Boolean.
Output fieldInterpretationReturned shape
frameBytesFrame BytesRequired. Safe integer.
wireBytesBeforeGapWire Bytes Before GapRequired. Safe integer.
json
{
  "input": {
    "reportedBytes": 72,
    "includesPreambleAndSfd": true
  },
  "output": {
    "frameBytes": 64,
    "wireBytesBeforeGap": 72
  }
}

Limitations and assumptions

  • The interpacket gap is excluded and FCS inclusion is not changed; the caller must know the measurement convention.
  • 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

Compare the computed span with the actual captured buffer and validate its contents separately.

References

  1. Calculation and input contract: network/ethernet-preamble-included-length-flag — tool.io

Similar or alternative tools