Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
pcap-common.h
1 /* pcap-common.h
2  * Declarations for code common to pcap and pcapng file formats
3  *
4  * Wiretap Library
5  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
6  *
7  * File format support for pcapng file format
8  * Copyright (c) 2007 by Ulf Lamping <ulf.lamping@web.de>
9  *
10  * SPDX-License-Identifier: GPL-2.0-or-later
11  */
12 
13 #ifndef __W_PCAP_COMMON_H__
14 #define __W_PCAP_COMMON_H__
15 
16 #include <glib.h>
17 #include "wtap.h"
18 #include "ws_symbol_export.h"
19 
20 extern guint wtap_max_snaplen_for_encap(int wtap_encap);
21 
22 extern int pcap_process_pseudo_header(FILE_T fh, int file_type, int wtap_encap,
23  guint packet_size, gboolean check_packet_size,
24  wtap_rec *rec, int *err, gchar **err_info);
25 
26 extern void pcap_read_post_process(int file_type, int wtap_encap,
27  wtap_rec *rec, guint8 *pd, gboolean bytes_swapped, int fcs_len);
28 
29 extern int pcap_get_phdr_size(int encap,
30  const union wtap_pseudo_header *pseudo_header);
31 
32 extern gboolean pcap_write_phdr(wtap_dumper *wdh, int wtap_encap,
33  const union wtap_pseudo_header *pseudo_header, int *err);
34 
35 #endif
Definition: wtap.h:1157
Definition: wtap.h:1274
Definition: file_wrappers.c:78
Definition: wtap-int.h:86