diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-04-21 20:51:22 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-04-21 20:51:22 +0000 |
commit | 21a210b77763224e0ac15611842cf7203d07fa08 (patch) | |
tree | 8bcb5aa12a0e02936ac8737faf20ddbae72d0998 /wiretap/wtap-int.h | |
parent | c1729024c520afc5c8824abc04b3a3cc9eacb716 (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.
svn path=/trunk/; revision=32534
Diffstat (limited to 'wiretap/wtap-int.h')
-rw-r--r-- | wiretap/wtap-int.h | 18 |
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; \ |