PCAP_GETERR(3)
π PCAP_GETERR(3) β Library Functions Manual π
β¨ NAME β¨
okay bestie, say hi to pcap_geterr and pcap_perror β together they're the "get or print libpcap error message text" duo, and they ate. π
πΈ SYNOPSIS πΈ
#include <pcap/pcap.h>
char *pcap_geterr(pcap_t *p);
void pcap_perror(pcap_t *p, const char *prefix);
π¦ DESCRIPTION π¦
pcap_geterr() returns the error text pertaining to the last pcap library error. It's giving "here's the last libpcap error, bestie" energy. obsessed. β¨
β οΈ NOTE, and do not skip this: the pointer it returns will no longer point to a valid error message string after thepcap_tpassed to it is closed; you must use or copy the string before closing thepcap_t. No cap β that pointer's valid era ends when thepcap_tcloses. π
pcap_perror() prints the text of the last pcap library error on stderr, prefixed by prefix. So it's literally the "slap your prefix on the last libpcap error and print it to stderr" function. π«Ά
π SEE ALSO π
xoxo, your libpcap bestie π β this was the Library Functions Manual page PCAP_GETERR(3), dated 15 January 2016. periodt. β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1994, 1996, 1997 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms