summaryrefslogtreecommitdiff
path: root/extract.h
diff options
context:
space:
mode:
authorhannes <hannes>2006-01-30 16:20:06 +0000
committerhannes <hannes>2006-01-30 16:20:06 +0000
commitb26f4c74baab13edc0a53a666efe3a31ca485605 (patch)
treec76de319c939353ce2de156e945739d84d6feaca /extract.h
parentf9adbad9ddcba72dd5d6757aacbf93c883287f85 (diff)
downloadtcpdump-b26f4c74baab13edc0a53a666efe3a31ca485605.tar.gz
-add support (TLV parser) for the juniper .pcap extensions
in lack of pcap-ng we prepend TLV encoded fields before the payload packet on all Juniper proprietary DLTs
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 f0479638..bab63f20 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.24 2005-01-15 02:06:50 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.25 2006-01-30 16:20:07 hannes Exp $ (LBL)
*/
/*
@@ -115,6 +115,10 @@ typedef struct {
(u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
(u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
(u_int32_t)*((const u_int8_t *)(p) + 0)))
+#define EXTRACT_LE_24BITS(p) \
+ ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
+ (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
+ (u_int32_t)*((const u_int8_t *)(p) + 0)))
#define EXTRACT_LE_64BITS(p) \
((u_int64_t)((u_int64_t)*((const u_int8_t *)(p) + 7) << 56 | \
(u_int64_t)*((const u_int8_t *)(p) + 6) << 48 | \