portmaster: github.com/safing/portmaster/firewall/interception/nfqueue Index | Files

package nfqueue

import "github.com/safing/portmaster/firewall/interception/nfqueue"


Package Files

multiqueue.go nfqueue.go packet.go


const (
    NFQ_DROP   uint32 = 0 // discarded the packet
    NFQ_ACCEPT uint32 = 1 // the packet passes, continue iterations
    NFQ_STOLEN uint32 = 2 // gone away
    NFQ_QUEUE  uint32 = 3 // inject the packet into a different queue (the target queue number is in the high 16 bits of the verdict)
    NFQ_REPEAT uint32 = 4 // iterate the same cycle once more
    NFQ_STOP   uint32 = 5 // accept, but don't continue iterations


var (
    ErrVerdictSentOrTimedOut error = fmt.Errorf("The verdict was already sent or timed out.")

type NFQueue Uses

type NFQueue struct {
    DefaultVerdict uint32
    Timeout        time.Duration

    Packets chan packet.Packet
    // contains filtered or unexported fields

func NewNFQueue Uses

func NewNFQueue(qid uint16) (nfq *NFQueue, err error)

func (*NFQueue) Destroy Uses

func (this *NFQueue) Destroy()

func (*NFQueue) Valid Uses

func (this *NFQueue) Valid() bool

type Packet Uses

type Packet struct {

    QueueId    uint16
    Id         uint32
    HWProtocol uint16
    Hook       uint8
    Mark       uint32
    // contains filtered or unexported fields

func (*Packet) Accept Uses

func (pkt *Packet) Accept() error

func (*Packet) Block Uses

func (pkt *Packet) Block() error

func (*Packet) Drop Uses

func (pkt *Packet) Drop() error

func (*Packet) PermanentAccept Uses

func (pkt *Packet) PermanentAccept() error

func (*Packet) PermanentBlock Uses

func (pkt *Packet) PermanentBlock() error

func (*Packet) PermanentDrop Uses

func (pkt *Packet) PermanentDrop() error

func (*Packet) RerouteToNameserver Uses

func (pkt *Packet) RerouteToNameserver() error

func (*Packet) RerouteToTunnel Uses

func (pkt *Packet) RerouteToTunnel() error

Package nfqueue imports 11 packages (graph) and is imported by 1 packages. Updated 2019-10-10. Refresh now. Tools for package owners.