netfilter

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

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

Go to latest
Published: Dec 7, 2019 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	AF_INET  = 2
	AF_INET6 = 10

	NF_DROP   Verdict = 0
	NF_ACCEPT Verdict = 1
	NF_STOLEN Verdict = 2
	NF_QUEUE  Verdict = 3
	NF_REPEAT Verdict = 4
	NF_STOP   Verdict = 5

	NF_DEFAULT_QUEUE_SIZE  uint32 = 4096
	NF_DEFAULT_PACKET_SIZE uint32 = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Packet gopacket.Packet
	Mark   uint32

	Uid int
	// contains filtered or unexported fields
}

func (*Packet) SetRequeueVerdict

func (p *Packet) SetRequeueVerdict(newQueueId uint16)

func (*Packet) SetVerdict

func (p *Packet) SetVerdict(v Verdict)

func (*Packet) SetVerdictAndMark

func (p *Packet) SetVerdictAndMark(v Verdict, mark uint32)

func (*Packet) SetVerdictWithPacket

func (p *Packet) SetVerdictWithPacket(v Verdict, packet []byte)

type Queue

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

func NewQueue

func NewQueue(queueId uint16) (q *Queue, err error)

func (*Queue) Close

func (q *Queue) Close()

func (*Queue) Packets

func (q *Queue) Packets() <-chan Packet

type Verdict

type Verdict C.uint

type VerdictContainer

type VerdictContainer struct {
	Verdict Verdict
	Mark    uint32
	Packet  []byte
}

type VerdictContainerC

type VerdictContainerC C.verdictContainer

Jump to

Keyboard shortcuts

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