dnsjit.input.zmmpcap(3)
π dnsjit.input.zmmpcap β Library Functions Manual π
okay bestie, gather round, because this one is a whole mood. this is dnsjit.input.zmmpcap(3), and she reads input from a PCAP file using mmap(). yes. mmap. she's that girl. π¦
β¨ NAME β¨
dnsjit.input.zmmpcap β Read input from a PCAP file using mmap()
β¨ SYNOPSIS β¨
local input = require("dnsjit.input.zmmpcap").new()
input:zstd()
input:open("file.pcap.zst")
input:receiver(filter_or_output)
input:run()
like. look at her. five lines and she's already eating. π
β¨ DESCRIPTION β¨
so basically? she reads input from a PCAP file by mapping the whole entire file into memory using mmap() β no cap, the whole thing β and then she parses the PCAP without libpcap. not a single libpcap in sight. iconic behaviour, honestly.
and then β after you open a file and read the PCAP header β the attributes get populated. she fills herself in. main character energy. π
πΈ Attributes πΈ
is_swappedβ tells you if the byte order in the PCAP is in reverse order of the host. backwards byte order? she clocks it. πis_nanosecβ tells you whether the time stamps are in nanoseconds or not. nanosecond girlies vs the rest of us.magic_numberβ the magic number. β¨ literally what it says on the tin.version_majorβ the major version number.version_minorβ the minor version number.thiszoneβ GMT to local correction.sigfigsβ accuracy of timestamps.snaplenβ max length of captured packets, in octets.networkβ the link type found in the PCAP header, seehttps://www.tcpdump.org/linktypes.html. go look, i'll wait. π«Άlinktypeβ the data link type, mapped fromnetwork. it's giving "derived field", lowkey.
π Functions π
Zmmpcap.new()β Create a new Zmmpcap input. fresh start, new you. β¨Zmmpcap:log()β Return the Log object to control logging of this instance or module. she keeps receipts. πZmmpcap:receiver(o)β Set the receiver to pass objects to.Zmmpcap:produce()β Return the C functions and context for producing objects.Zmmpcap:lz4()β Useliblz4to decompress the input file/data.Zmmpcap:zstd()β Uselibzstdto decompress the input file/data.Zmmpcap:gzip()β Usezlib/gzipto decompress the input file/data.Zmmpcap:lzma()β Useliblzma/xzto decompress the input file/data.Zmmpcap:have_support()β Return true if support for selected compression library is built in. (bestie, check this before you get your hopes up. π)Zmmpcap:open(file)β Open a PCAP file for processing and read the PCAP header. Returns0on success.Zmmpcap:run()β Start processing packets and send each packet read to the receiver. Returns0if all packets was read successfully.Zmmpcap:packets()β Return the number of packets seen. she's been counting. π
ngl the return values matter here:0means success, on bothopen()andrun(). don't sleep on that. π
π AUTHORS and CONTRIBUTORS π
Jerry LundstrΓΆm (DNS-OARC), TomΓ‘Ε‘ KΕΓΕΎek (CZ.NIC), Petr Ε paΔek (ISC)
Maintained by DNS-OARC
https://www.dns-oarc.net/
legends, all of them. periodt. π
π BUGS π
found a bug? want a feature? first of all, thank you for your service. π«‘
For issues and feature requests please use:
https://codeberg.org/DNS-OARC/dnsjit/issues
For question and help please use:
admin@dns-oarc.net
they're nice, i promise. go say hi. π
and that's the whole page, bestie β you read it, you understood it, you slayed it. π§ this was dnsjit.input.zmmpcap(3) from dnsjit 1.5.1, dated dnsjit.input.zmmpcap(3) (yes the footer said the same name twice, she's consistent and we love that for her). go map some files to memory. π¦β¨π
π¦ where this page comes from
- epel 10: dnsjit 1.5.1-2.el10_2 Β· GPL-3.0-or-later
- epel 9: dnsjit 1.5.1-2.el9 Β· GPL-3.0-or-later
- fedora 43: dnsjit 1.5.1-2.fc43 Β· GPL-3.0-or-later
- fedora 43: dnsjit 1.5.1-2.fc43 Β· GPL-3.0-or-later
- fedora 44: dnsjit 1.5.1-2.fc44 Β· GPL-3.0-or-later
- fedora 44: dnsjit 1.5.1-2.fc44 Β· GPL-3.0-or-later
- ubuntu resolute: dnsjit 1.5.1-2 Β· GPL-3.0-or-later
- ubuntu stonking: dnsjit-dev 1.5.1-6 Β· GPL-3.0-or-later
- Copyright (c) 2018-2026 OARC, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms