The following code repositories are available. See the Examples page for example dnstap usage.

dnstap.pb

This is the Protocol Buffers schema defining the layout of dnstap payloads. Use this if you want to process dnstap payloads in a programming language with protobuf support, or if you want to extend the dnstap schema to support new event types. It is not needed otherwise.

$ git clone https://github.com/dnstap/dnstap.pb.git
$ cd dnstap.pb
$ protoc-c --c_out=. dnstap.proto
$ protoc --cpp_out=. dnstap.proto
$ protoc --python_out=. dnstap.proto
$ protoc --go_out=. dnstap.proto

fstrm

This is fstrm, a Frame Streams implementation in C. It is the transport used for dnstap software written in C.

$ git clone https://github.com/farsightsec/fstrm.git
$ cd fstrm && ./autogen.sh && ./configure && make && sudo make install

protobuf-c

This is protobuf-c, a Protocol Buffers implementation in C. It is the encoder used for dnstap software written in C. It requires that protobuf be installed first.

$ git clone https://github.com/protobuf-c/protobuf-c.git
$ cd protobuf-c && ./autogen.sh && ./configure && make && sudo make install

Unbound with dnstap support

NLnet Labs' Unbound recursive DNS server supports dnstap as of version 1.5.0, but it must be explicitly enabled at build time.

Building Unbound with dnstap support requires that the fstrm and protobuf-c libraries be installed first.

Two new ./configure arguments have been added: --enable-dnstap to build with dnstap support, and --with-dnstap-socket-path to set the default dnstap socket path.

$ wget https://www.unbound.net/downloads/unbound-latest.tar.gz
$ tar xf unbound-latest.tar.gz
$ cd unbound-1.*
$ ./configure --enable-dnstap && make && sudo make install

golang-dnstap

This is the Go language library for working with dnstap sockets, log files, and message payloads. It includes a command-line capture tool, dnstap.

$ go get -u -v github.com/dnstap/golang-dnstap
$ go get -u -v github.com/dnstap/golang-dnstap/dnstap

golang-framestream

This is the Go language library for working with Frame Streams. It is a dependency of golang-dnstap.

$ go get -u -v github.com/farsightsec/golang-framestream