PCAP_FILE(3)
π 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 thesavefilemight refer to a file larger than 2 gigabytes. π«Ά applications that usepcap_file()should, if possible, use calls that support large files on the return value ofpcap_file()or the value returned byfileno(3)when passed the return value ofpcap_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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1994, 1996, 1997 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms