pcap_geterr(3pcap)

pcap_geterr3pcap

Get or print libpcap error message text

Usage

#include <pcap/pcap.h>

char *pcap_geterr(pcap_t *p); void pcap_perror(pcap_t *p, const char *prefix);

Overview

pcap_geterr() returns the error text pertaining to the last pcap library error. NOTE: the pointer it returns will no longer point to a valid error message string after the pcap_t passed to it is closed; you must use or copy the string before closing the pcap_t.

pcap_perror() prints the text of the last pcap library error on stderr, prefixed by prefix.

Releases

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

  1. 10.6–10.6.8
  2. 10.7–10.11.6
  3. 10.12–10.14.6
  4. 10.15–10.15.1
  5. 10.15.2–12.5
  6. 13.0–26.5

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