summaryrefslogtreecommitdiffstats
path: root/wiretap/pcap-common.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /wiretap/pcap-common.h
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wiretap/pcap-common.h')
-rw-r--r--wiretap/pcap-common.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/wiretap/pcap-common.h b/wiretap/pcap-common.h
new file mode 100644
index 00000000..af6c8218
--- /dev/null
+++ b/wiretap/pcap-common.h
@@ -0,0 +1,36 @@
+/** @file
+ *
+ * Declarations for code common to pcap and pcapng file formats
+ *
+ * Wiretap Library
+ * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
+ *
+ * File format support for pcapng file format
+ * Copyright (c) 2007 by Ulf Lamping <ulf.lamping@web.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef __W_PCAP_COMMON_H__
+#define __W_PCAP_COMMON_H__
+
+#include <glib.h>
+#include "wtap.h"
+#include "ws_symbol_export.h"
+
+extern guint wtap_max_snaplen_for_encap(int wtap_encap);
+
+extern int pcap_process_pseudo_header(FILE_T fh, gboolean is_nokia,
+ int wtap_encap, guint packet_size, wtap_rec *rec,
+ int *err, gchar **err_info);
+
+extern void pcap_read_post_process(gboolean is_nokia, int wtap_encap,
+ wtap_rec *rec, guint8 *pd, gboolean bytes_swapped, int fcs_len);
+
+extern int pcap_get_phdr_size(int encap,
+ const union wtap_pseudo_header *pseudo_header);
+
+extern gboolean pcap_write_phdr(wtap_dumper *wdh, int wtap_encap,
+ const union wtap_pseudo_header *pseudo_header, int *err);
+
+#endif