PCAP_MAJOR_VERSION(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… PCAP_MAJOR_VERSION(3) πŸ’…

okay so this is the PCAP_MAJOR_VERSION(3) page from the Library Functions Manual, and it's giving "let's peek at a savefile's version numbers" energy. Bestie, it's short, it's specific, and it's lowkey iconic. ✨

✨ NAME ✨

pcap_major_version, pcap_minor_version β€” get the version number of a savefile

πŸŽ€ SYNOPSIS πŸŽ€

#include <pcap/pcap.h>

int pcap_major_version(pcap_t *p);
int pcap_minor_version(pcap_t *p);

πŸ¦‹ DESCRIPTION πŸ¦‹

So if p refers to a savefile, pcap_major_version() returns the major number of the file format of the savefile, and pcap_minor_version() returns the minor number of the file format of the savefile. Yes bestie, they're a matching set. πŸ’–

The version number is stored in the savefile; note that the meaning of its values depends on the type of savefile (for example, pcap or pcapng). It's giving "context matters," iykyk. πŸ¦‹

If p refers to a live capture, the values returned by pcap_major_version() and pcap_minor_version() are not meaningful. Not me warning you: those numbers are not it for live capture, so don't treat them like useful info. 😭

🌈 SEE ALSO 🌈

pcap(3) β€” go read that one too, bestie, it's the main character of this friend group. πŸ‘‘


xoxo, signing off from the 8 January 2018 version of PCAP_MAJOR_VERSION(3) πŸ’…βœ¨

πŸ“¦ where this page comes from