dpa(1)
π dpa(1) β the DNS Packet Analyzer, bestie edition π
okay so real talk: this is the dpa manual page from the General Commands Manual section (section 1, aka "commands you just type"), and she is everything. dpa stands for DNS Packet Analyzer β she reads your ip trace files and pulls apart every DNS packet in them like it's gossip. β¨
π¦ NAME π¦
dpa β DNS Packet Analyzer. Analyze DNS packets in ip trace files π
πΈ SYNOPSIS πΈ
dpa [ OPTION ] TRACEFILE
β¨ DESCRIPTION β¨
So dpa is used to analyze dns packets in trace files. No cap, that's literally her whole job. π«Ά
She's got 3 main options, and the girlies need to know them:
- count
- filter
- count uniques (i.e. count all different occurrences) β this one is the "how many distinct vibes" option, iykyk π
π OPTIONS π
-cexpressionlist β Count occurrences of matching expressions. It's giving tally marks but make it DNS. π₯-fexpression β Filter: only process packets that match the expression. Everything else? Not invited to the party. π-hβ Show usage.-pβ Show the total number of correct DNS packets, and percentage of-uand-cvalues (of the total of matching on the-ffilter. if no filter is given, percentages are on all correct dns packets). So yes, this one is percentage o'clock β-offile β Write all packets that match the-fflag to file, as pcap data. πΎ-ofhfile β Write all packets that match the-fflag to file, in hexadecimal format, readable bydrill. Fancy hex dump energy β¨-sβ Show possible match names.-smatchname β show possible match operators and values for name.-sfβ Only evaluate packets (in representation format) that match the-ffilter. If no-fwas given, evaluate all correct dns packets.-umatchnamelist β Count every occurrence of every value of the matchname (for instance, count all packetsizes, see EXAMPLES inldns-dpa(1)). π§-uaβ For every matchname in-u, show the average value of all matches. Behaviour for match types that do not have an integer value is undefined. π¨ (yeah bestie, undefined means undefined, don't come for me)-uacβ For every matchname in-u, show the average number of times this value was encountered.-umnumber β Only show the results from-ufor values that occurred more than number times. Gatekeeping the little guys π-vlevel β Set verbosity to level (1-5, 5 being the highest). Mostly used for debugging. Turn it up to 5 for the full unhinged experience π-notipfile β Write packets that were not recognized as IP packets to file (as pcap data).-baddnsfile β Write dns packets that were too mangled to parse to file (as pcap data). π the poor things-versionβ Show version and exit. Bye bestie π
π LIST AND MATCHES π
A <matchnamelist> is a comma separated list of match names (use -s to see possible match names). A <expressionlist> is a comma separated list of expressions. Comma separated, comma separated, say it with me β commas are the glue of this whole operation. π
An expression has the following form:
<expr>: (<expr>)
<expr> | <expr>
<expr> & <expr>
<match>
<match>: <matchname> <operator> <value>
<operator>: = equal to <value> != not equal to <value>
> greater than <value> < lesser than <value>
>= greater than or equal to <value> <= lesser than or equal to <value> ~= contains <value>
See the -s option for possible matchnames, operators and values. πΈ
π EXAMPLES π
Like, the actual receipts. Copy these exactly, bestie, I'm not kidding:
ldns-dpa -u packetsize -p test.tr
Count all different packetsizes in test.tr and show the percentages. π
ldns-dpa -f "edns=1&qr=0" -of edns.tr test.tr
Filter out all edns enable queries in test.tr and put them in edns.tr. π«Ά
ldns-dpa -f edns=1 -c tc=1 -u rcode test.tr
For all edns packets, count the number of truncated packets and all their rcodes in test.tr.
ldns-dpa -c tc=1,qr=0,qr=1,opcode=QUERY test.tr
For all packets, count the number of truncated packets, the number of packets with qr=0, the number of packets with qr=1 and the number of queries in test.tr.
ldns-dpa -u packetsize -ua test.tr
Show all packet sizes and the average packet size per packet. Math class but make it iconic β¨
ldns-dpa -u srcaddress -uac test.tr
Show all packet source addresses and the average number of packets sent from this address.
sudo tcpdump -i eth0 -s 0 -U -w - port 53 | ldns-dpa -f qr=0 -sf
Print all query packets seen on the specified interface. Main character pipeline energy π₯
π AUTHOR π
Written by Jelte Jansen for NLnetLabs. We stan. π
π REPORTING BUGS π
Report bugs to <dns-team@nlnetlabs.nl>. Tell them everything, they can handle it π
π COPYRIGHT π
Copyright (C) 2005 NLnet Labs. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. So like, she's free, but she's also not your mom. π¨
and that's the whole page bestie β dpa(1), dated 1 Nov 2005, part of the dpa(1) family, and now you know her fr fr π
β¨π¦
π¦ where this page comes from
- alpine 3.22: ldns-doc 1.8.4-r0 Β· BSD-3-Clause
- alpine 3.23: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- alpine 3.24: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- arch rolling: ldns 1.9.2-1 Β· custom:BSD
- debian trixie: ldnsutils 1.8.4-2+b1
- fedora 43: ldns-utils 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-utils 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: ldns-utils 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-utils 1.9.2-1.fc44 Β· BSD-3-Clause
- nixos 26.05: ldns 1.9.2
- nixpkgs unstable: ldns 1.9.2
- opensuse-leap 16.0: ldns 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns 1.8.4-160000.3.1 Β· BSD-3-Clause
- ubuntu questing: ldnsutils 1.8.4-2build1
- ubuntu resolute: ldnsutils 1.8.4-2build3
- ubuntu stonking: ldnsutils 1.9.2-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms