PCAP_CLOSE(3)

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

πŸ’– PCAP_CLOSE(3) πŸ’–

okay so bestie, welcome to the PCAP_CLOSE(3) page from the Library Functions Manual β€” this is the β€œclose a capture device or savefile” page, and it’s literally the cleanup queen πŸ‘‘βœ¨


🌸 NAME 🌸

pcap_close β€” close a capture device or savefile 🫢

✨ SYNOPSIS ✨

#include <pcap/pcap.h>

void pcap_close(pcap_t *p);

πŸŽ€ DESCRIPTION πŸŽ€

pcap_close() does the goodbye choreography: it closes the files associated with p and deallocates resources πŸ’…. So, 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 🫢.

🚨 no cap: if that stream is stdin, it is not closed.

πŸ’… SEE ALSO πŸ’…


xoxo, PCAP_CLOSE(3) from the Library Functions Manual, dated 12 October 2024 β€” she’s iconic, she’s clean, she’s done πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from