Skip to content

Main content

TCP Window Scaling One Direction Tool

Compute tcp window scaling one direction from explicit bounded inputs.

Loading tool…

Description

Multiply the 16-bit window by 2 raised to shift, with shift from 0 through 14.

TCP advertises a receive window in a 16-bit field. A negotiated scale expands its interpretation for one direction, while SYN segments use the unscaled field.

Multiply the 16-bit window by 2 raised to shift, with shift from 0 through 14.

When to use this tool

Use TCP Window Scaling One Direction when you need a window capacity under an explicit scaling convention.

How to use the tool and how it works

  1. Enter window, shift, syn. 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 effectiveBytes. Use the output convention below.

Multiply the 16-bit window by 2 raised to shift, with shift from 0 through 14. When syn is true, use exponent zero.1

Input fieldMeaning and unitsAccepted input
windowWindowRequired. Safe integer; minimum 0; maximum 65535.
shiftShiftRequired. Safe integer; minimum 0; maximum 14.
synSynRequired. Boolean.
Output fieldInterpretationReturned shape
effectiveBytesEffective BytesRequired. Finite number.
json
{
  "input": {
    "window": 1000,
    "shift": 4,
    "syn": false
  },
  "output": {
    "effectiveBytes": 16000
  }
}

Limitations and assumptions

  • Use the negotiated scale for this direction; negotiation and segment classification are caller responsibilities.
  • 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 both handshake directions to establish the negotiated shift before interpreting later window fields.

References

  1. Calculation and input contract: network/tcp-window-scaling-one-direction — tool.io

Similar or alternative tools