]> The Tcpdump Group git mirrors - tcpdump/blobdiff - extract.h
Add an "EXTRACT_64BITS()" macro - using the "EXTRACT_32BITS()" macro, so
[tcpdump] / extract.h
index ecb03962861bea33a4479428be8151bc67e54f14..0d40ed3a19fb1b4e69cbab0a1e4a9dd5b340e19f 100644 (file)
--- 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))