dnsjit.input.zmmpcap(3) Library Functions Manual dnsjit.input.zmmpcap(3)

dnsjit.input.zmmpcap - Read input from a PCAP file using mmap()


local input = require("dnsjit.input.zmmpcap").new()
input:zstd()
input:open("file.pcap.zst")
input:receiver(filter_or_output)
input:run()

Read input from a PCAP file by mapping the whole file to memory using mmap() and parse the PCAP without libpcap. After opening a file and reading the PCAP header, the attributes are populated.

Indicate if the byte order in the PCAP is in reverse order of the host.
Indicate if the time stamps are in nanoseconds or not.
Magic number.
Major version number.
Minor version number.
GMT to local correction.
Accuracy of timestamps.
Max length of captured packets, in octets.
The link type found in the PCAP header, see https://www.tcpdump.org/linktypes.html .
The data link type, mapped from network.

Create a new Zmmpcap input.
Return the Log object to control logging of this instance or module.
Set the receiver to pass objects to.
Return the C functions and context for producing objects.
Use liblz4 to decompress the input file/data.
Use libzstd to decompress the input file/data.
Use zlib/gzip to decompress the input file/data.
Use liblzma/xz to decompress the input file/data.
Return true if support for selected compression library is built in.
Open a PCAP file for processing and read the PCAP header. Returns 0 on success.
Start processing packets and send each packet read to the receiver. Returns 0 if all packets was read successfully.
Return the number of packets seen.

Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC)

Maintained by DNS-OARC

https://www.dns-oarc.net/

For issues and feature requests please use:

https://github.com/DNS-OARC/dnsjit/issues

For question and help please use:

admin@dns-oarc.net
1.4.0 dnsjit