packet

package
v0.0.0-...-4828f2e Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionDrop   = 0
	ActionAccept = 1
	ActionRepeat = 4
	ProtoTCP     = "tcp"
	ProtoUDP     = "udp"
	ProtoICMP    = "icmp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Proto   string
	Src     string
	SrcIP   string
	Dst     string
	DstIP   string
	SrcPort string
	DstPort string
	Id      int
}

func Parse

func Parse(id int, data []byte) *Packet

func (*Packet) FlipDirection

func (p *Packet) FlipDirection()

func (*Packet) IsICMP

func (p *Packet) IsICMP() bool

func (*Packet) IsInboundDNS

func (p *Packet) IsInboundDNS() bool

func (*Packet) IsLocalTraffic

func (p *Packet) IsLocalTraffic() bool

func (*Packet) IsOutboundDNS

func (p *Packet) IsOutboundDNS() bool

func (*Packet) IsUDPLooopback

func (p *Packet) IsUDPLooopback() bool

func (*Packet) ResolveDNS

func (p *Packet) ResolveDNS()

func (*Packet) ShouldLog

func (p *Packet) ShouldLog() bool

func (*Packet) String

func (p *Packet) String() string

Jump to

Keyboard shortcuts

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