protocol

package
v0.0.0-...-7897c6d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidIPPacket = errors.New("invalid IP packet")
)

Functions

func ReleaseIP

func ReleaseIP(ip IP)

Types

type IP

type IP interface {
	Version() int
	Src() netip.Addr
	Dst() netip.Addr
}

func ParseIP

func ParseIP(buff []byte) (IP, error)

type IPPacket

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

func (*IPPacket) Dst

func (ip *IPPacket) Dst() netip.Addr

func (*IPPacket) Src

func (ip *IPPacket) Src() netip.Addr

func (*IPPacket) Version

func (ip *IPPacket) Version() int

Jump to

Keyboard shortcuts

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