pcap_snapshot(3pcap)

pcap_snapshot3pcap

Get the snapshot length

Usage

#include <pcap/pcap.h>

int pcap_snapshot(pcap_t *p);

Overview

pcap_snapshot() returns the snapshot length specified when pcap_set_snaplen(3PCAP) or pcap_open_live(3PCAP) was called, for a live capture, or the snapshot length from the capture file, for a ``savefile''.

It must not be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP).

Return value

pcap_snapshot() returns the snapshot length on success and PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated.

Releases

90 releases since Mac OS X 10.6; the text changed 7 times.

  1. 10.6–10.6.8
  2. 10.7–10.8.5
  3. 10.9–10.9.5
  4. 10.10–10.11.6
  5. 10.12–10.14.6
  6. 10.15–10.15.1
  7. 10.15.2–12.5
  8. 13.0–26.5

From libpcap 146 in macOS 26.5. Parsed by carta from the page's man source.