pcap_close(3pcap)

pcap_close3pcap

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

9 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0–7
  2. 8
  3. 9–10
  4. 11–13
  5. Arch

From libpcap 1.11.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.