Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Functions
pcap-encap.h File Reference
#include "wtap.h"
#include "ws_symbol_export.h"

Go to the source code of this file.

Functions

WS_DLL_PUBLIC int wtap_pcap_encap_to_wtap_encap (int encap)
 Converts a PCAP encapsulation type to a Wireshark encapsulation type.
 
int wtap_wtap_encap_to_pcap_encap (int encap)
 Converts a Wireshark encapsulation type to a PCAP encapsulation type.
 
WS_DLL_PUBLIC bool wtap_encap_requires_phdr (int encap)
 Checks if a given encapsulation type requires a pseudo-header.
 

Detailed Description

Declarations for routines to handle pcap/pcapng linktype values

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

File format support for pcapng file format Copyright (c) 2007 by Ulf Lamping ulf.l.nosp@m.ampi.nosp@m.ng@we.nosp@m.b.de

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

Function Documentation

◆ wtap_encap_requires_phdr()

WS_DLL_PUBLIC bool wtap_encap_requires_phdr ( int  encap)

Checks if a given encapsulation type requires a pseudo-header.

Parameters
encapThe encapsulation type.
Returns
bool true if the encapsulation type requires a pseudo-header, false otherwise.

◆ wtap_pcap_encap_to_wtap_encap()

WS_DLL_PUBLIC int wtap_pcap_encap_to_wtap_encap ( int  encap)

Converts a PCAP encapsulation type to a Wireshark encapsulation type.

Parameters
encapThe PCAP encapsulation type.
Returns
int The corresponding Wireshark encapsulation type, or WTAP_ENCAP_UNKNOWN if not found.

◆ wtap_wtap_encap_to_pcap_encap()

int wtap_wtap_encap_to_pcap_encap ( int  encap)

Converts a Wireshark encapsulation type to a PCAP encapsulation type.

Parameters
encapThe Wireshark encapsulation type.
Returns
int The corresponding PCAP encapsulation type, or -1 if not found.