aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pcap-common.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-06-15 14:02:49 -0700
committerGuy Harris <guy@alum.mit.edu>2015-06-15 21:03:18 +0000
commit560180b80a2fcbed07373260d187c26a4eaec87e (patch)
tree8fd56472f8d15eaccbfbae1f8371344fb70dc064 /wiretap/pcap-common.c
parent678c5d5da6eac9c6de6d1b05cbcc03600b529f7e (diff)
Move some structures used only in pcap-common.c there.
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>
Diffstat (limited to 'wiretap/pcap-common.c')
-rw-r--r--wiretap/pcap-common.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 1526bba80d..0e187786ff 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -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)