PCAP_FILE(3)

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

πŸŽ€ PCAP_FILE(3) πŸŽ€

okay bestie, welcome to the PCAP_FILE(3) page β€” it lives in the Library Functions Manual, and we’re about to make pcap_file make sense, no cap. πŸ’–

🌸 NAME 🌸

pcap_file β€” get the standard I/O stream for a savefile being read 🫢

✨ SYNOPSIS ✨

#include <pcap/pcap.h>

FILE *pcap_file(pcap_t *p);

πŸ’… DESCRIPTION πŸ’…

okay so pcap_file() returns the standard I/O stream of the savefile, if a savefile was opened with pcap_open_offline(3), or NULL, if a network device was opened with pcap_create(3) and pcap_activate(3), or with pcap_open_live(3). like, that’s the whole mood: savefile β†’ stream; live network device β†’ NULL. πŸ’€

heads up bestie: the Packet Capture library is usually built with large file support, so the standard I/O stream of the savefile might refer to a file larger than 2 gigabytes. 🫢 applications that use pcap_file() should, if possible, use calls that support large files on the return value of pcap_file() or the value returned by fileno(3) when passed the return value of pcap_file(). this is the β€œdon’t get caught out by big files” reminder, fr fr. πŸ”₯

🌈 SEE ALSO 🌈

pcap(3) β€” go peek, bestie πŸ‘‘


catch u later, icon β€” this was the PCAP_FILE(3) page from the Library Functions Manual, dated 3 January 2014. stay hydrated and may your streams never be NULL when you wanted a savefile πŸ’œπŸ§š

πŸ“¦ where this page comes from