DOKK / manpages / debian 12 / dnsjit / dnsjit.input.zpcap.3.en
dnsjit.input.zpcap(3) Library Functions Manual dnsjit.input.zpcap(3)

dnsjit.input.zpcap - Read input from a PCAP file that is compressed


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

Read input from a PCAP file that is compressed 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 Zpcap 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 posix_fadvise() to indicate sequential reading (if supported), may increase performance. MUST be called before open().
Use liblz4 to decompress the input file/data.
Use libzstd 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.
Open a PCAP file for processing and read the PCAP header using a file descriptor, for example io.stdin or with io.open(). Will not take ownership of the file descriptor. 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.

dnsjit.input.fpcap(3)

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.2.3 dnsjit