conntrack

package module
v0.0.0-...-e27a707 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: MIT Imports: 6 Imported by: 2

README

conntrack

Install

go get honnef.co/go/conntrack

Documentation

Documentation can be found at godoc.org.

Documentation

Overview

Package conntrack allows reading and filtering entries from the conntrack table of Netfilter. import "honnef.co/go/conntrack"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	Original  Subflow
	Reply     Subflow
	Protocol  *netdb.Protoent
	State     string
	Unreplied bool
	Assured   bool
	TTL       uint64
}

type FlowSlice

type FlowSlice []Flow

func Flows

func Flows() (FlowSlice, error)

func (FlowSlice) Filter

func (flows FlowSlice) Filter(filter func(flow Flow) bool) FlowSlice

func (FlowSlice) FilterByProtocol

func (flows FlowSlice) FilterByProtocol(protocol *netdb.Protoent) FlowSlice

func (FlowSlice) FilterByState

func (flows FlowSlice) FilterByState(state string) FlowSlice

func (FlowSlice) FilterByType

func (flows FlowSlice) FilterByType(which TypeFilter) FlowSlice

type Subflow

type Subflow struct {
	Source      net.IP
	Destination net.IP
	SPort       int
	DPort       int
	Bytes       uint64
	Packets     uint64
}

type TypeFilter

type TypeFilter uint8
const (
	SNATFilter TypeFilter = 1 << iota
	DNATFilter
	RoutedFilter
	LocalFilter
)

Jump to

Keyboard shortcuts

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