PCAP_MAJOR_VERSION(3PCAP)

πŸ’– PCAP_MAJOR_VERSION πŸ’–

okay so bestie, welcome to the 3PCAP corner of the manual, where we're talking about pcap_major_version and pcap_minor_version β€” yes they're two functions, yes they do almost the same thing, no you don't have to pick a favourite (but you will) πŸŽ€


✨ 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 πŸ’…

okay so here's the tea. If p is pointing at a savefile, then pcap_major_version() hands you back the major number of that savefile's file format, and pcap_minor_version() hands you back the minor number of that savefile's file format. two lil' functions, one big job. πŸ’–

and the version number? it's literally stored inside the savefile itself, no cap. but β€” and this is the part where you gotta pay attention β€” the meaning of those values depends on what type of savefile you're dealing with (for example, pcap or pcapng). so like, same numbers, different lore depending on the format. iykyk ✨

🫢 quick vibe check though: if p refers to a live capture, then the values that pcap_major_version() and pcap_minor_version() return are not meaningful. like, don't build your whole personality around them, they're not telling you anything real. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

pcap(3PCAP)


that's the whole page bestie, short and iconic, just like us πŸ’œ this lil' baddie of a manpage is dated 8 January 2018 and lives under the name PCAP_MAJOR_VERSION(3PCAP). go forth and read your savefile versions, periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from