geoip

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PluginGoodbye

func PluginGoodbye(childsync *sync.WaitGroup)

PluginGoodbye is called when the daemon is shutting down. We close our GeoIP engine and call done for the argumented WaitGroup to let the main process know we're finished.

func PluginNetfilterHandler

func PluginNetfilterHandler(ch chan<- int32, mess support.TrafficMessage, ctid uint)

PluginNetfilterHandler is called to handle netfilter packet data. We extract the source and destination IP address from the packet, lookup the GeoIP country code for each, and store them in the conntrack dictionary.

func PluginStartup

func PluginStartup(childsync *sync.WaitGroup)

PluginStartup is called to allow plugin specific initialization. We initialize an instance of the GeoIP engine using any existing database we can find, or we download if needed. We increment the argumented WaitGroup so the main process can wait for our goodbye function to return during shutdown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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