pcap_perror Subroutine

Purpose

Prints the passed-in prefix, followed by the most recent error text.

Library

pcap Library (libpcap.a)

Syntax

#include <pcap.h>

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

Description

The pcap_perror subroutine prints the text of the last pcap library error to stderr, prefixed by prefix. If there were no previous errors, only prefix is printed.

Parameters

Item Description
p Points to a packet capture descriptor as returned by the pcap_open_live subroutine or the pcap_open_offline subroutine.
prefix Specifies the string that is to be printed before the stored error message.