Move some structures used only in pcap-common.c there.
authorGuy Harris <guy@alum.mit.edu>
Mon, 15 Jun 2015 21:02:49 +0000 (14:02 -0700)
committerGuy Harris <guy@alum.mit.edu>
Mon, 15 Jun 2015 21:03:18 +0000 (21:03 +0000)
Those aren't pseudo-headers exported from libwiretap, they're just
structures corresponding to the pseudo-headers for some pcap/pcap-ng
link-layer header types.

Change-Id: Iec37cfc162b64adacdeb57e14e546bced7b673fa
Reviewed-on: https://code.wireshark.org/review/8941
Reviewed-by: Guy Harris <guy@alum.mit.edu>
wiretap/pcap-common.c
wiretap/wtap.h

index 1526bba80d73eeb17b01ca5f2d2d6f6c22527c4b..0e187786ffe13073fd4f8fd9d0f9b616bd8dd0e2 100644 (file)
@@ -1322,6 +1322,17 @@ pcap_byteswap_nflog_pseudoheader(struct wtap_pkthdr *phdr, guint8 *pd)
        }
 }
 
+/*
+ * Pseudo-header at the beginning of DLT_BLUETOOTH_HCI_H4_WITH_PHDR frames.
+ * Values in network byte order.
+ */
+struct libpcap_bt_phdr {
+       guint32 direction;     /* Bit 0 hold the frame direction. */
+};
+
+#define LIBPCAP_BT_PHDR_SENT    0
+#define LIBPCAP_BT_PHDR_RECV    1
+
 static gboolean
 pcap_read_bt_pseudoheader(FILE_T fh,
     union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info)
@@ -1335,6 +1346,15 @@ pcap_read_bt_pseudoheader(FILE_T fh,
        return TRUE;
 }
 
+/*
+ * Pseudo-header at the beginning of DLT_BLUETOOTH_LINUX_MONITOR frames.
+ * Values in network byte order.
+ */
+struct libpcap_bt_monitor_phdr {
+       guint16 adapter_id;
+       guint16 opcode;
+};
+
 static gboolean
 pcap_read_bt_monitor_pseudoheader(FILE_T fh,
     union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info)
@@ -1363,6 +1383,16 @@ pcap_read_llcp_pseudoheader(FILE_T fh,
        return TRUE;
 }
 
+/*
+ * Pseudo-header at the beginning of DLT_PPP_WITH_DIR frames.
+ */
+struct libpcap_ppp_phdr {
+       guint8 direction;
+};
+
+#define LIBPCAP_PPP_PHDR_RECV    0
+#define LIBPCAP_PPP_PHDR_SENT    1
+
 static gboolean
 pcap_read_ppp_pseudoheader(FILE_T fh,
     union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info)
index ece8c7ed23440cc055a437a1a9308a3c5013d8c1..264c6b8d53ea1f4c65789e7729b677e9ab562505 100644 (file)
@@ -746,36 +746,6 @@ struct catapult_dct2000_phdr
     struct wtap *wth;
 };
 
-#define LIBPCAP_BT_PHDR_SENT    0
-#define LIBPCAP_BT_PHDR_RECV    1
-
-/*
- * Header prepended by libpcap to each bluetooth hci h4 frame.
- * Values in network byte order
- */
-struct libpcap_bt_phdr {
-    guint32 direction;     /* Bit 0 hold the frame direction. */
-};
-
-/*
- * Header prepended by libpcap to each bluetooth monitor frame
- * Values in network byte order
- */
-struct libpcap_bt_monitor_phdr {
-    guint16 adapter_id;
-    guint16 opcode;
-};
-
-#define LIBPCAP_PPP_PHDR_RECV    0
-#define LIBPCAP_PPP_PHDR_SENT    1
-
-/*
- * Header prepended by libpcap to each ppp frame.
- */
-struct libpcap_ppp_phdr {
-    guint8 direction;
-};
-
 /*
  * Endace Record Format pseudo header
  */