Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
libpcap.h File Reference
#include <wiretap/wtap.h>

Go to the source code of this file.

Classes

struct  pcap_hdr
 File header for a libpcap capture file, immediately following the magic number. More...
struct  pcaprec_hdr
 Per-packet record header in a standard libpcap capture file. More...
struct  pcaprec_modified_hdr
 Per-packet record header for Alexey Kuznetsov's modified libpcap format, extending the standard header with interface and protocol metadata. More...
struct  pcaprec_ss990915_hdr
 Per-packet record header for the ss990915 incarnation of Alexey's modified libpcap format, as found in SuSE Linux 6.3. More...
struct  pcaprec_nokia_hdr
 Per-packet record header for the Nokia-variant libpcap format, as used on some Nokia firewall devices. More...

Macros

#define PCAP_MAGIC   0xa1b2c3d4
#define PCAP_SWAPPED_MAGIC   0xd4c3b2a1
#define PCAP_MODIFIED_MAGIC   0xa1b2cd34
#define PCAP_SWAPPED_MODIFIED_MAGIC   0x34cdb2a1
#define PCAP_IXIAHW_MAGIC   0x1c0001ac
#define PCAP_SWAPPED_IXIAHW_MAGIC   0xac01001c
#define PCAP_IXIASW_MAGIC   0x1c0001ab
#define PCAP_SWAPPED_IXIASW_MAGIC   0xab01001c
#define PCAP_NSEC_MAGIC   0xa1b23c4d
#define PCAP_SWAPPED_NSEC_MAGIC   0x4d3cb2a1

Functions

wtap_open_return_val libpcap_open (wtap *wth, int *err, char **err_info)
 Opens a capture file using libpcap format.

Detailed Description

Wiretap Library Copyright (c) 1998 by Gilbert Ramirez gram@.nosp@m.alum.nosp@m.ni.ri.nosp@m.ce.e.nosp@m.du

SPDX-License-Identifier: GPL-2.0-or-later

Function Documentation

◆ libpcap_open()

wtap_open_return_val libpcap_open ( wtap * wth,
int * err,
char ** err_info )

Opens a capture file using libpcap format.

Parameters
wthPointer to the wtap structure.
errPointer to an integer that will hold any error code if an error occurs.
err_infoPointer to a char pointer that will hold any error information if an error occurs.
Returns
wtap_open_return_val The result of the open operation, indicating success or failure.

< Precision: 1 microsecond (6 fractional digits).

< Precision: 1 nanosecond (9 fractional digits).

< Precision: 1 microsecond (6 fractional digits).

< Precision: 1 microsecond (6 fractional digits).

< Precision: 1 microsecond (6 fractional digits).

< Precision: 1 nanosecond (9 fractional digits).

< Precision: 1 microsecond (6 fractional digits).