Skip to content

Main content

TCP Sequence Halfspace Tie Tool

Detect antipodal 32-bit TCP sequence values where modular before/after comparison is ambiguous.

Loading tool…

Description

Calculate the forward distance from first to second modulo 2^32.

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.

Calculate the forward distance from first to second modulo 2^32.

When to use this tool

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

How to use the tool and how it works

  1. Enter first, second. 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 halfspaceTie, forwardDistance. Inspect halfspaceTie before interpreting the associated values.

Calculate the forward distance from first to second modulo 2^32. Set halfspaceTie only when that distance equals 2^31.1

Input fieldMeaning and unitsAccepted input
firstFirstRequired. Safe integer; minimum 0; maximum 4294967295.
secondSecondRequired. Safe integer; minimum 0; maximum 4294967295.
Output fieldInterpretationReturned shape
halfspaceTieHalfspace TieRequired. Boolean.
forwardDistanceForward DistanceRequired. Safe integer.
json
{
  "input": {
    "first": 0,
    "second": 2147483648
  },
  "output": {
    "halfspaceTie": true,
    "forwardDistance": 2147483648
  }
}

Limitations and assumptions

  • A false tie flag does not by itself establish the temporal order of packets.
  • 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-halfspace-tie — tool.io

Similar or alternative tools