PCAP_DUMP_CLOSE(3PCAP)

πŸŽ€ NAME πŸŽ€

okay so bestie, this is the PCAP_DUMP_CLOSE(3PCAP) page πŸ’– and it's literally about one tiny but iconic function: pcap_dump_close β€” close a savefile being written to ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <pcap/pcap.h>

void pcap_dump_close(pcap_dumper_t *p);

🌸 DESCRIPTION 🌸

so pcap_dump_close() does the goodbye thing πŸ‘‹ β€” it closes the savefile associated with p and deallocates resources. very β€œclean up your room before you leave” of it, no cap πŸ’…

and like, this matters: if p refers to a savefile that was opened with pcap_dump_fopen(), the stream provided to that routine will be closed unless it is stdout 🫢

one exception bestie: if it's stdout, it stays open. the function is not out here closing your terminal output 😭

🌈 SEE ALSO 🌈

  • pcap(3PCAP)
  • pcap_dump_open(3PCAP)
  • pcap_dump(3PCAP)

mwah πŸ’‹ this little icon was served by the PCAP_DUMP_CLOSE(3PCAP) manual, dated 12 October 2024 β€” catch u next time, bestie πŸŒˆβœ¨πŸ’œ

πŸ“¦ where this page comes from