driver

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

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RecvBufferSize   = 4 * 1024 * 1024
	NflogBufferSize  = 128 * 1024 // Must be <= 128k (checked in kernel source)
	NfRecvBufferSize = 16 * 1024 * 1024
	NflogTimeout     = 100 // Timeout before sending data in 1/100th second
	MaxQueueLogs     = C.MAX_PACKETS - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(data []byte) int

type NfLog

type NfLog struct {

	// The multicast address
	McastGroup int
	// contains filtered or unexported fields
}

NfLog

func NewNfLog

func NewNfLog(McastGroup int, fn CallbackFunc) *NfLog

Create a new NfLog

McastGroup is that specified in ip[6]tables

func (*NfLog) Close

func (nflog *NfLog) Close()

Close the NfLog down

func (*NfLog) Loop

func (nflog *NfLog) Loop()

Receive packets in a loop until quit

Jump to

Keyboard shortcuts

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