aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap-int.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-04-21 20:51:22 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-04-21 20:51:22 +0000
commite4f6cf400e4f5209a50bdb94ce8fd677b4672642 (patch)
tree8bcb5aa12a0e02936ac8737faf20ddbae72d0998 /wiretap/wtap-int.h
parent2b7ce2685ee81add48e9ba637294cd85ded43a7a (diff)
From Chris Maynard:
Support PPP-over-USB. Don't remove the USB pseudo-header from the packet data for Linux USB packets, just byte-swap it if necessary and have the USB dissector fetch the pseudo-header from the raw packet data. Update USB language ID values. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32534 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/wtap-int.h')
-rw-r--r--wiretap/wtap-int.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h
index c85c26af15..1967457cf9 100644
--- a/wiretap/wtap-int.h
+++ b/wiretap/wtap-int.h
@@ -122,9 +122,25 @@ extern gint wtap_num_file_types;
((((x)&0xFF00)>>8) | \
(((x)&0x00FF)<<8))
-/* Macros to byte-swap possibly-unaligned 32-bit and 16-bit quantities;
+/* Macros to byte-swap possibly-unaligned 64-bit, 32-bit and 16-bit quantities;
* they take a pointer to the quantity, and byte-swap it in place.
*/
+#define PBSWAP64(p) \
+ { \
+ guint8 tmp; \
+ tmp = (p)[7]; \
+ (p)[7] = (p)[0]; \
+ (p)[0] = tmp; \
+ tmp = (p)[6]; \
+ (p)[6] = (p)[1]; \
+ (p)[1] = tmp; \
+ tmp = (p)[5]; \
+ (p)[5] = (p)[2]; \
+ (p)[2] = tmp; \
+ tmp = (p)[4]; \
+ (p)[4] = (p)[3]; \
+ (p)[3] = tmp; \
+ }
#define PBSWAP32(p) \
{ \
guint8 tmp; \