PCAP_CLOSE(3PCAP)

πŸŽ€ NAME πŸŽ€

okay bestie, welcome to the pcap_close(3PCAP) page β€” pcap_close is the function that closes a capture device or savefile. πŸ’…βœ¨

✨ SYNOPSIS ✨

#include <pcap/pcap.h>

void pcap_close(pcap_t *p);

πŸ’– DESCRIPTION πŸ’–

so pcap_close() closes the files associated with p and deallocates resources. iconic cleanup moment, no cap. 🫢

this means that, for example, if p refers to a savefile that was opened with pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision(), the stream provided to the routine will be closed β€” unless it is stdin. yes bestie, stdin is the exception. πŸ™ˆ

🌈 SEE ALSO 🌈

  • pcap(3PCAP) β€” the pcap manual page, go check it
  • pcap_open_offline(3PCAP) β€” the offline-open manual page, slay

that’s the whole vibe πŸ’– this page is PCAP_CLOSE(3PCAP), source/version line dated 12 October 2024 β€” mwah, go forth and close those files πŸŽ€βœ¨

πŸ“¦ where this page comes from