tcp

package
v0.0.0-...-989fa2c Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0, MIT Imports: 3 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) StateFields

func (offset *TSOffset) StateFields() []string

func (*TSOffset) StateLoad

func (offset *TSOffset) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*TSOffset) StateSave

func (offset *TSOffset) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*TSOffset) StateTypeName

func (offset *TSOffset) StateTypeName() string

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