diff options
author | hannes <hannes> | 2006-01-30 16:20:06 +0000 |
---|---|---|
committer | hannes <hannes> | 2006-01-30 16:20:06 +0000 |
commit | b26f4c74baab13edc0a53a666efe3a31ca485605 (patch) | |
tree | c76de319c939353ce2de156e945739d84d6feaca /extract.h | |
parent | f9adbad9ddcba72dd5d6757aacbf93c883287f85 (diff) | |
download | tcpdump-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.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 | \ |