pcap_close(3)

pcap_close3

Close a capture device or savefile

Usage

#include <pcap/pcap.h>

void pcap_close(pcap_t *p);

Overview

pcap_close() closes the files associated with p and deallocates resources. 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.

Releases

39 releases since FreeBSD 8.0-RELEASE; the text changed 7 times.

  1. 8.0–8.4
  2. 9.0–10.4
  3. 11.0
  4. 11.1–13.4
  5. 13.5–14.4
  6. 14.5
  7. 15.0
  8. 15.1–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's man source.