packetd

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: GPL-2.0 Imports: 24 Imported by: 0

README

Build Status Go Report Card

packetd

Userspace packet processing daemon

Building locally

You'll need an Untangle mirror to get the patched libnetfilter-queue-dev:

apt-get install libnetfilter-log-dev libnetfilter-queue-dev libnetfilter-conntrack-dev

You will also need to install several golang packages dependencies:

go get -u github.com/gin-gonic/gin
go get -u github.com/gin-contrib/cors
go get -u github.com/google/gopacket
go get -u github.com/mattn/go-sqlite3
go get -u github.com/oschwald/geoip2-golang

Then build the regular way:

go build

If you want to use the golint tool, you can install it with this command:

go get -u golang.org/x/lint/golint

You can run golint with the following command: (assumes GOPATH=~/golang)

~/golang/bin/golint github.com/untangle/packetd/...

Building in docker

For this to work you have to have your clone under a path of the form:

[...]/src/github.com/untangle/packetd

libc target

docker-compose -f docker-compose.build.yml up --build libc

Result:

# file ./packetd
./packetd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=7459d11c6fd1dd3ed5d3e3ed5c2320e27dc4bea4, with debug_info, not stripped

MUSL target

docker-compose -f docker-compose.build.yml up --build musl

Result:

# file ./packetd
./packetd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, with debug_info, not stripped

Running it

You'll also need an Untangle mirror for most of those:

apt-get install untangle-classd untangle-geoip-database untangle-python3-sync-settings libnetfilter-log1 libnetfilter-queue1 libnetfilter-conntrack3

Then:

./packetd

golint

Get golint:

go get -u golang.org/x/lint/golint

Use it:

${GOPATH}/bin/golint $(pwd)/...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
plugins
classify
Package classify classifies sessions as certain applications each packet gets sent to a classd daemon (the categorization engine) the classd daemon returns the classification information and classify attaches the information to the session.
Package classify classifies sessions as certain applications each packet gets sent to a classd daemon (the categorization engine) the classd daemon returns the classification information and classify attaches the information to the session.
dns
reporter
Package reporter provides the "reporter" plugin The reporter plugin listens to networking events and writes them to the database
Package reporter provides the "reporter" plugin The reporter plugin listens to networking events and writes them to the database
sni
services
dispatch
Package dispatch provides dispatching of network/kernel events to various subscribers It provides an API for plugins to subscribe to for 3 types of network events 1) NFqueue (netfilter queue) packets 2) Conntrack events (New, Update, Destroy) 3) Netlogger events (from NFLOG target) The dispatch will register global callbacks with the kernel package and then dispatch events to subscribers accordingly
Package dispatch provides dispatching of network/kernel events to various subscribers It provides an API for plugins to subscribe to for 3 types of network events 1) NFqueue (netfilter queue) packets 2) Conntrack events (New, Update, Destroy) 3) Netlogger events (from NFLOG target) The dispatch will register global callbacks with the kernel package and then dispatch events to subscribers accordingly

Jump to

Keyboard shortcuts

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