diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-03 00:10:35 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-03 00:10:35 +0000 |
commit | a9aefe77afb61a7f5e56e78c7c22b34dc8aca4ba (patch) | |
tree | 673106797d80239c0627b37f2b59206541439438 /epan/dissectors/packet-dcerpc-nt.h | |
parent | 0a9289108df89d5b3953488ce8d6d138ddb7ce89 (diff) |
add a new macro to do alignment to either 4 or 8 bytes depending on if
we use ndr or ndr64.
we need this since some structures change their alignment depending on
the transfer syntax used.
svn path=/trunk/; revision=30254
Diffstat (limited to 'epan/dissectors/packet-dcerpc-nt.h')
-rw-r--r-- | epan/dissectors/packet-dcerpc-nt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.h b/epan/dissectors/packet-dcerpc-nt.h index 1e63e1dc9e..a9f85d412c 100644 --- a/epan/dissectors/packet-dcerpc-nt.h +++ b/epan/dissectors/packet-dcerpc-nt.h @@ -66,6 +66,15 @@ extern const value_string platform_id_vals[]; } \ } +#define ALIGN_TO_4_OR_8_BYTES \ + { dcerpc_info *xzdi2; \ + xzdi2=pinfo->private_data; \ + if (xzdi2->call_data->flags & DCERPC_IS_NDR64) { \ + ALIGN_TO_8_BYTES; \ + } else { \ + ALIGN_TO_4_BYTES; \ + } \ + } int dissect_ndr_counted_ascii_string_cb(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, |