aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-01-12 21:20:50 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-01-12 21:20:50 +0000
commitf2b6a257d418b427b2ee0c017bb9532ae745fcb7 (patch)
treecf5cf816dcb91f823c24af64a7b037da7a0740d8 /epan/dissectors/packet-dcerpc.c
parent5a9f8d2267d161689da88cd99230086b9b8c933d (diff)
add new function dissect_dcerpc_uuid_t and let dissect_ndr_uuid_t call it
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13006 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 2e33fedc72..33860a8c58 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -1088,6 +1088,60 @@ dissect_dcerpc_double(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
}
+int
+dissect_dcerpc_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+ proto_tree *tree, char *drep,
+ int hfindex, e_uuid_t *pdata)
+{
+ e_uuid_t uuid;
+ header_field_info* hfi;
+#if 0
+ gchar *uuid_name;
+#endif
+
+
+ dcerpc_tvb_get_uuid (tvb, offset, drep, &uuid);
+ if (tree) {
+ /* get name of protocol field to prepend it later */
+ hfi = proto_registrar_get_nth(hfindex);
+
+#if 0
+ /* XXX - get the name won't work correct, as we don't know the version of this uuid (if it has one) */
+ /* look for a registered uuid name */
+ uuid_name = dcerpc_get_uuid_name(&uuid, 0);
+
+ if (uuid_name) {
+ /* we know the name of this uuid */
+ proto_tree_add_string_format (tree, hfindex, tvb, offset, 16, "",
+ "%s: %s (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
+ hfi->name, uuid_name,
+ uuid.Data1, uuid.Data2, uuid.Data3,
+ uuid.Data4[0], uuid.Data4[1],
+ uuid.Data4[2], uuid.Data4[3],
+ uuid.Data4[4], uuid.Data4[5],
+ uuid.Data4[6], uuid.Data4[7]);
+ } else {
+#endif
+ /* we don't know the name of this uuid */
+ proto_tree_add_string_format (tree, hfindex, tvb, offset, 16, "",
+ "%s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ hfi->name,
+ uuid.Data1, uuid.Data2, uuid.Data3,
+ uuid.Data4[0], uuid.Data4[1],
+ uuid.Data4[2], uuid.Data4[3],
+ uuid.Data4[4], uuid.Data4[5],
+ uuid.Data4[6], uuid.Data4[7]);
+#if 0
+ }
+#endif
+ }
+ if (pdata) {
+ *pdata = uuid;
+ }
+ return offset + 16;
+}
+
+
/*
* a couple simpler things
*/