nfqparser

package
v10.267.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NFQLayout

type NFQLayout struct {
	QueueNum string
	// process ID of software listening to the queue
	PeerPortID string
	// current number of packets waiting in the queue
	QueueTotal string
	// 0 and 1 only message only provide meta data. If 2, the message provides a part of packet of size copy range.
	CopyMode string
	// length of packet data to put in message
	CopyRange string
	// number of packets dropped because queue was full
	QueueDropped string
	// number of packets dropped because netlink message could not be sent to userspace.
	// If this counter is not zero, try to increase netlink buffer size. On the application side,
	// you will see gap in packet id if netlink message are lost.
	UserDropped string
	// packet id of last packet
	IDSequence string
}

NFQLayout is the layout of /proc/net/netfilter/nfnetlink_queue

func (*NFQLayout) String

func (n *NFQLayout) String() string

String returns string representation of particular queue

type NFQParser

type NFQParser struct {
	sync.Mutex
	// contains filtered or unexported fields
}

NFQParser holds nfqparser fields

func NewNFQParser

func NewNFQParser() *NFQParser

NewNFQParser returns nfqparser handler

func (*NFQParser) RetrieveAll

func (n *NFQParser) RetrieveAll() map[string]NFQLayout

RetrieveAll returns all layouts

func (*NFQParser) RetrieveByQueue

func (n *NFQParser) RetrieveByQueue(queueNum string) *NFQLayout

RetrieveByQueue returns layout for a specific queue number

func (*NFQParser) String

func (n *NFQParser) String() string

String returns string renresentation of nfqueue data

func (*NFQParser) Synchronize

func (n *NFQParser) Synchronize() error

Synchronize reads from file and parses it

Jump to

Keyboard shortcuts

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