Skip to content

Main content

TCP Sequence Epoch Distance Tool

Compare explicitly unwrapped TCP epochs and unsigned sequence words; epochs are supplied, never inferred from serial ordering.

Loading tool…

Description

Compute (secondEpoch - firstEpoch) × 2^32 + secondSequence - firstSequence using exact decimal-integer epochs.

TCP sequence and timestamp fields wrap in a 32-bit space. A modular distance gives a local displacement; ordering near half the space and multiple wraps requires additional context.

Compute (secondEpoch - firstEpoch) × 2^32 + secondSequence - firstSequence using exact decimal-integer epochs.

When to use this tool

Use TCP Sequence Epoch Distance when you need a bounded sequence-space distance or interval relationship.

How to use the tool and how it works

  1. Enter firstEpoch, firstSequence, secondEpoch, secondSequence. 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 distanceDecimal. Use the output convention below.

Compute (secondEpoch - firstEpoch) × 2^32 + secondSequence - firstSequence using exact decimal-integer epochs. Return a signed decimal distance.1

Input fieldMeaning and unitsAccepted input
firstEpochFirst EpochRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
firstSequenceFirst SequenceRequired. Safe integer; minimum 0; maximum 4294967295.
secondEpochSecond EpochRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
secondSequenceSecond SequenceRequired. Safe integer; minimum 0; maximum 4294967295.
Output fieldInterpretationReturned shape
distanceDecimalDistance DecimalRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "firstEpoch": "2",
    "firstSequence": 4294967290,
    "secondEpoch": "3",
    "secondSequence": 4
  },
  "output": {
    "distanceDecimal": "10"
  }
}

Limitations and assumptions

  • Epochs must already be known; this does not discover wrap counts from sequence numbers alone.
  • 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

Combine sequence arithmetic with connection state, packet chronology, and explicit wrap epochs where available.

References

  1. Calculation and input contract: network/tcp-sequence-epoch-distance — tool.io

Similar or alternative tools