mpacket_filter

package
v0.0.0-...-4adfca9 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PacketFilterManager

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

The packet filter manager

func GetFilterManagerInstance

func GetFilterManagerInstance() *PacketFilterManager

Singleton getter

func (*PacketFilterManager) ProcessPacket

func (filterManager *PacketFilterManager) ProcessPacket(packet *gopacket.Packet, resultChannel *chan PacketFilterResult)

Applies all loaded Filters against the provided packet When all filters have completed the result will be pushed to signalChannel This is a blocking call

Filters are run concurrently using goroutines and a WaitGroup is used to wait for results from all filters

Try to do as little work as possible in this function

type PacketFilterResult

type PacketFilterResult struct {
	Action         m_packet_filter.Action
	FilterResponse *m_packet_filter.FilterResponse
}

Stores the result of filtering packet and the filters response that caused it to be dropped

Jump to

Keyboard shortcuts

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