tcp

package
v0.0.0-...-2c7ddd0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FIN = 1
	SYN = 2
	RST = 4
	PSH = 8
	ACK = 16
	URG = 32
)

Variables

This section is empty.

Functions

Types

type Header struct {
	Source      uint16
	Destination uint16
	SeqNum      uint32
	AckNum      uint32
	DataOffset  uint8
	Reserved    uint8
	ECN         uint8
	Ctrl        uint8
	Window      uint16
	Checksum    uint16
	Urgent      uint16
	Options     []Option
}

func NewHeader

func NewHeader(b []byte) *Header

func (*Header) HasFlag

func (tcp *Header) HasFlag(flag byte) bool

func (*Header) Marshal

func (tcp *Header) Marshal() []byte

type Option

type Option struct {
	Kind   uint8
	Length uint8
	Data   []byte
}

Jump to

Keyboard shortcuts

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