tcp

package
v0.0.0-...-f7ad032 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Overview

Package tcp contains internal type definitions that are not expected to be used by anyone else outside pkg/tcpip.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TSOffset

type TSOffset struct {
	// contains filtered or unexported fields
}

TSOffset is an offset applied to the value of the TSVal field in the TCP Timestamp option.

+stateify savable

func NewTSOffset

func NewTSOffset(milliseconds uint32) TSOffset

NewTSOffset creates a new TSOffset from milliseconds.

func (TSOffset) Elapsed

func (offset TSOffset) Elapsed(now tcpip.MonotonicTime, tsEcr uint32) time.Duration

Elapsed calculates the elapsed time given now and the echoed back timestamp.

func (TSOffset) TSVal

func (offset TSOffset) TSVal(now tcpip.MonotonicTime) uint32

TSVal applies the offset to now and returns the timestamp in milliseconds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL