aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-nt.h
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-08 00:48:45 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-08 00:48:45 +0000
commit54aa6a799ad4830a1d6ddca8e0029ee4cf3b5509 (patch)
tree8ade31125322ea8b504e84669399c3b3011befda /epan/dissectors/packet-dcerpc-nt.h
parentc028f8c55e3796c7e8687054d4d25b92d5597e71 (diff)
add a macro to handle types that are 2 bytes in ndr and 4 bytes in
ndr64, i.e. enums. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31826 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dcerpc-nt.h')
-rw-r--r--epan/dissectors/packet-dcerpc-nt.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.h b/epan/dissectors/packet-dcerpc-nt.h
index 63364788fc..8b48b27d90 100644
--- a/epan/dissectors/packet-dcerpc-nt.h
+++ b/epan/dissectors/packet-dcerpc-nt.h
@@ -73,6 +73,18 @@ extern const value_string platform_id_vals[];
} \
}
+#define ALIGN_TO_3_BYTES ALIGN_TO_2_OR_4_BYTES
+
+#define ALIGN_TO_2_OR_4_BYTES \
+ { dcerpc_info *xzdi2; \
+ xzdi2=pinfo->private_data; \
+ if (xzdi2->call_data->flags & DCERPC_IS_NDR64) { \
+ ALIGN_TO_4_BYTES; \
+ } else { \
+ ALIGN_TO_2_BYTES; \
+ } \
+ }
+
int
dissect_ndr_counted_ascii_string_cb(tvbuff_t *tvb, int offset,