dnsjit.input.mmpcap(3)

πŸ“¦
version 1.5.1 Β· 5 versions
, in epel 10, epel 9, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– dnsjit.input.mmpcap β€” the manual page, but make it cute ✨

okay so bestie, welcome to dnsjit.input.mmpcap(3) β€” section 3 of the dnsjit library functions manual, and she is iconic. this is the one that reads input from a PCAP file using mmap(). no cap. let's get into it 🫢


✨ NAME ✨

dnsjit.input.mmpcap β€” read input from a PCAP file using mmap(). that's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

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

literally copy that exactly as it is, mwah πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is: she reads input from a PCAP file by mapping the whole file to memory using mmap(), and then she parses the PCAP without libpcap. no libpcap needed, she's self-sufficient like that. πŸ’…

and the way that she works is β€” after you open a file and she reads the PCAP header, the attributes get populated. that's the moment. main character energy honestly. ✨

πŸ‘‘ Attributes

  • is_swapped β€” says whether the byte order in the PCAP is in reverse order of the host. i.e. is it backwards bestie πŸ™ˆ
  • is_nanosec β€” tells you if the time stamps are in nanoseconds or not. nano or not nano, that is the question ⭐
  • magic_number β€” the magic number. yes, magic. ✨
  • 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, see https://www.tcpdump.org/linktypes.html. go look it up, i'll wait πŸ’œ
  • linktype β€” the data link type, mapped from network.

🧚 Functions

  • Mmpcap.new() β€” create a new Mmpcap input. birth of a legend, honestly 🌈
  • Mmpcap:log() β€” return the Log object so you can control logging of this instance or module. for when you need to gossip about what she's doing πŸ‘€
  • Mmpcap:receiver(o) β€” set the receiver to pass objects to.
  • Mmpcap:produce() β€” return the C functions and context for producing objects. very low-level, very cunt πŸ’…
  • Mmpcap:open(file) β€” open a PCAP file for processing and read the PCAP header. returns 0 on success. πŸŽ€
  • Mmpcap:run() β€” start processing packets and send each packet read to the receiver. returns 0 if all packets was read successfully. slay πŸ”₯
  • Mmpcap:packets() β€” return the number of packets seen. the receipts πŸ“Š

πŸ’– AUTHORS and CONTRIBUTORS πŸ’–

the girlies and guys who made this happen:

  • Jerry LundstrΓΆm (DNS-OARC)
  • TomΓ‘Ε‘ KΕ™Γ­ΕΎek (CZ.NIC)
  • Petr Ε paček (ISC)

maintained by DNS-OARC β€” go say hi, they're doing the lord's work:

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

πŸ’€ BUGS πŸ’€

found a problem? want a feature? bestie, don't suffer in silence, for issues and feature requests please use:

https://codeberg.org/DNS-OARC/dnsjit/issues

and for questions and help please use:

admin@dns-oarc.net
fr fr, they want to hear from you. no gatekeeping πŸ™ˆ

and that's the whole page, bestie! 🫢 this was dnsjit version 1.5.1, from the dnsjit.input.mmpcap(3) manual β€” tysm for reading, you ate that, periodt. πŸ’…βœ¨πŸŽ€πŸ¦‹