summaryrefslogtreecommitdiff
path: root/wiretap/pcap-common.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-04-27 09:28:28 +0000
committerGuy Harris <guy@alum.mit.edu>2009-04-27 09:28:28 +0000
commit18a3b0659c209a2e0121eacd640b75e6c1c3b87d (patch)
treecefeac416ed607a73d27b6423f1536f4c37b4c5b /wiretap/pcap-common.h
parent2b36f00d1c397cfabd6442d3d9c1abc81e31702c (diff)
downloadwireshark-18a3b0659c209a2e0121eacd640b75e6c1c3b87d.tar.gz
Have the libpcap and pcap-NG code share the LINKTYPE_-to-WTAP_ENCAP_
mapping table - they should be using the same values. Share the mapping routines as well. svn path=/trunk/; revision=28173
Diffstat (limited to 'wiretap/pcap-common.h')
-rw-r--r--wiretap/pcap-common.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/wiretap/pcap-common.h b/wiretap/pcap-common.h
new file mode 100644
index 0000000000..efe11c476d
--- /dev/null
+++ b/wiretap/pcap-common.h
@@ -0,0 +1,34 @@
+/* pcap-common.h
+ * Declarations for code common to libpcap and pcap-NG file formats
+ *
+ * $Id$
+ *
+ * Wiretap Library
+ * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
+ *
+ * File format support for pcap-ng file format
+ * Copyright (c) 2007 by Ulf Lamping <ulf.lamping@web.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+struct encap_map {
+ int dlt_value;
+ int wtap_encap_value;
+};
+
+extern const struct encap_map pcap_to_wtap_map[];
+
+extern int wtap_wtap_encap_to_pcap_encap(int encap);