netlink

package
v0.0.0-...-37b34e5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NFNLGRP_NONE                  = 0
	NFNLGRP_CONNTRACK_NEW         = 1
	NFNLGRP_CONNTRACK_UPDATE      = 2
	NFNLGRP_CONNTRACK_DESTROY     = 4
	NFNLGRP_CONNTRACK_EXP_NEW     = 8
	NFNLGRP_CONNTRACK_EXP_UPDATE  = 16
	NFNLGRP_CONNTRACK_EXP_DESTROY = 32
	NFNLGRP_NFTABLES              = 64
	NFNLGRP_ACCT_QUOTA            = 128
	NFNLGRP_NFTRACE               = 256
)
View Source
const (
	// Constants for the Netlink message types
	NLMSG_NOOP    = 0x1
	NLMSG_ERROR   = 0x2
	NLMSG_DONE    = 0x3
	NLMSG_OVERRUN = 0x4
)
View Source
const NFNLGRP_MAX = NFNLGRP_NFTRACE - 1

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultNetlinkWatcher

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

func (*DefaultNetlinkWatcher) Monitor

func (w *DefaultNetlinkWatcher) Monitor() (events <-chan []byte, errors <-chan error, setupErr error)

func (*DefaultNetlinkWatcher) Running

func (w *DefaultNetlinkWatcher) Running() bool

func (*DefaultNetlinkWatcher) Stop

func (w *DefaultNetlinkWatcher) Stop() error

type NetlinkWatcher

type NetlinkWatcher interface {
	Monitor() (events <-chan []byte, errors <-chan error, setupErr error)
	Stop() error
	Running() bool
}

func NewNetlinkMonitor

func NewNetlinkMonitor() (watcher NetlinkWatcher, err error)

type NlMsgHdr

type NlMsgHdr struct {
	Len   uint32
	Type  uint16
	Flags uint16
	Seq   uint32
	Pid   uint32
}

Netlink message header

func ParseNetlinkMessageHeader

func ParseNetlinkMessageHeader(b []byte) (*NlMsgHdr, error)

ParseNetlinkMessageHeader parses the Netlink message header

Jump to

Keyboard shortcuts

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