summaryrefslogtreecommitdiff
path: root/extract.h
diff options
context:
space:
mode:
authorguy <guy>2004-09-24 18:21:25 +0000
committerguy <guy>2004-09-24 18:21:25 +0000
commitabad30540b26443dc1036670bb114b2184e9b4ae (patch)
tree7985959b9249d62d87a55558fb2edfa672666649 /extract.h
parent3be7baca5e616fdba50290da410185b248014461 (diff)
downloadtcpdump-abad30540b26443dc1036670bb114b2184e9b4ae.tar.gz
Add an "EXTRACT_64BITS()" macro - using the "EXTRACT_32BITS()" macro, so
we get the fast implementations if we are on a processor that doesn't require alignment.
Diffstat (limited to 'extract.h')
-rw-r--r--extract.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/extract.h b/extract.h
index ecb03962..0d40ed3a 100644
--- a/extract.h
+++ b/extract.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.20 2004-09-23 21:30:12 dyoung Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.21 2004-09-24 18:21:25 guy Exp $ (LBL)
*/
/* Network to host order macros */
@@ -85,6 +85,10 @@ typedef struct {
(u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
(u_int32_t)*((const u_int8_t *)(p) + 2)))
+#define EXTRACT_64BITS(p) \
+ ((u_int64_t)(u_int64_t)(EXTRACT_32BITS((p) + 0)) << 32 | \
+ (u_int64_t)(EXTRACT_32BITS((p) + 4)))
+
/* Little endian protocol host order macros */
#define EXTRACT_LE_8BITS(p) (*(p))