• C++ 85.7%
  • Shell 6%
  • M4 4.8%
  • Perl 2.1%
  • Makefile 1.1%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann 04545931a2
Releasing debian version 1.8.0+dfsg-1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-10-19 21:28:20 +02:00
.builds Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
.forgejo Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
collector_sample Adding upstream version 1.7.3+dfsg. 2025-02-10 05:34:23 +01:00
debian Releasing debian version 1.8.0+dfsg-1. 2026-10-19 21:28:20 +02:00
m4 Adding upstream version 1.7.3+dfsg. 2025-02-10 05:34:23 +01:00
pcap Adding upstream version 1.7.3+dfsg. 2025-02-10 05:34:23 +01:00
rpm Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
src Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
.clang-format Merging upstream version 1.7.4+dfsg. 2026-09-16 12:53:15 +02:00
.gitignore Merging upstream version 1.7.4+dfsg. 2026-09-16 12:53:15 +02:00
autogen.sh Merging upstream version 1.7.4+dfsg. 2026-09-16 12:53:15 +02:00
CHANGES Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
configure.ac Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
CONTRIBUTING.md Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
COPYING Adding upstream version 1.7.3+dfsg. 2025-02-10 05:34:23 +01:00
FAQ.md Adding upstream version 1.7.3+dfsg. 2025-02-10 05:34:23 +01:00
FIELDS.md Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
fmt.sh Merging upstream version 1.7.4+dfsg. 2026-09-16 12:53:15 +02:00
FUNCTIONS.md Adding upstream version 1.7.3+dfsg. 2025-02-10 05:34:23 +01:00
Makefile.am Merging upstream version 1.7.4+dfsg. 2026-09-16 12:53:15 +02:00
README.md Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
SECURITY.md Merging upstream version 1.8.0+dfsg. 2026-10-19 21:26:05 +02:00
sonar-project.properties.local Merging upstream version 1.7.4+dfsg. 2026-09-16 12:53:15 +02:00

PacketQ

Bugs Security Rating

packetq is a command line tool to run SQL queries directly on PCAP/DNSTAP files, the results can be outputted as JSON (default), formatted/compact CSV or XML. It also contain a very simplistic web-server in order to inspect PCAP files remotely. PacketQ was previously known as DNS2db but was renamed in 2011 when it was rebuilt and could handle protocols other than DNS among other things.

More information is provided in our FAQ, functions, and fields documentation.

A short demo-video of PacketQ's capabilities is available on http://www.youtube.com/watch?v=70wJmWZE9tY

Features

  • Super-fast native decoding of PCAP-files (even gzipped) and dirt-quick in-memory sorting algorithms.
  • A extensible protocol decoding design with build in support for ICMP and DNS from start.
  • Support for grouping, sorting, counting and most other important SQL-functions.
  • Build-in web-server, JSON API and a simple JQuery-based GUI concept application with graphs.
  • Can be designed to cache queries by pre-processing PCAPs into static JSON-files that can be used to make queries again.
  • Built in DNS-resolver function (used by GUI).
  • Support for sampling. Helps when making queries to large, uniform PCAP-files.
  • Can convert flags in packet-headers to text on the fly.
  • Can make multiple queries towards the same data in memory.

More information may be found here:

Issues should be reported here:

General support and discussion:

Dependencies

PacketQ requires a couple of libraries beside a normal C++ compiling environment with autoconf, automake, libtool and pkgconfig.

The required libraries are zlib and dnswire.

PacketQ has an optional dependency on the MaxMindDB library (for the CC() and ASN() functions).

To install the dependencies under Debian/Ubuntu:

apt-get install -y zlib1g-dev libmaxminddb-dev libdnswire-dev

To install the dependencies under CentOS (with EPEL/PowerTools enabled):

yum install -y zlib-devel libmaxminddb-devel

See DNS-OARC's packages page on how to get dnswire for CentOS and others.

Build from repository

git clone https://codeberg.org/DNS-OARC/PacketQ.git
cd PacketQ
./autogen.sh
./configure [options]
make
make install

Building from source tarball

The source tarball from DNS-OARC comes prepared with configure:

tar zxvf packetq-version.tar.gz
cd packetq-version
./configure [options]
make
make install

Usage example

Retrieves the 10 first packets containing DNS information from the file sample.pcap:

packetq -s "select * from dns limit 10" sample.pcap

Starts a web-server on port 8080 (-p8080) as a daemon (-d) serving files from the directory html/ (-w html/) and PCAP files from the directory pcap/ (-r pcap/):

packetq -d -p8080 -w html/ -r pcap/

Author(s)

  • Per Granå @Per-Grana, original author
  • Jerry Lundström @jelu, maintainer since 2017

Contributor(s)

See also the full list of contributors.

Copyright (c) 2017-2026 OARC, Inc.

Copyright (c) 2011-2017, IIS - The Internet Foundation in Sweden

All rights reserved.

This file is part of PacketQ.

PacketQ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PacketQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PacketQ.  If not, see <http://www.gnu.org/licenses/>.