parse

package
v0.0.0-...-d9e9cd4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(payload []byte) (networkLayer, error)

Types

type IPv4

type IPv4 struct {
	Inet
}

type IPv6

type IPv6 struct {
	Inet
}

type Inet

type Inet struct {
	IPVersion      int
	IPHeaderLength int
	Length         uint16
	Protocol       int
	Source         net.IP
	Destination    net.IP
	Transport      transportLayer
}

func (*Inet) DomainName

func (p *Inet) DomainName() string

func (*Inet) Dst

func (p *Inet) Dst() net.IP

func (*Inet) Src

func (p *Inet) Src() net.IP

func (*Inet) Version

func (p *Inet) Version() int

type TCP

type TCP struct {
	SourcePort      uint16
	DestinationPort uint16
	Hello           tls.ClientHello
}

type UDP

type UDP struct {
	SourcePort      uint16
	DestinationPort uint16
	Hello           tls.ClientHello
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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