From 17e0d15df3ac2a8909ba83162dbf9bd5e1537659 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 1 Feb 2005 05:21:08 +0000 Subject: Move "dissect_nt_GUID()" into "packet-dcerpc-nt.c", as it's used by the LSA dissector as well, and declare it in "packet-dcerpc-nt.h". svn path=/trunk/; revision=13223 --- epan/dissectors/packet-dcerpc-netlogon.c | 15 --------------- epan/dissectors/packet-dcerpc-nt.c | 17 +++++++++++++++++ epan/dissectors/packet-dcerpc-nt.h | 6 ++++++ 3 files changed, 23 insertions(+), 15 deletions(-) (limited to 'epan') diff --git a/epan/dissectors/packet-dcerpc-netlogon.c b/epan/dissectors/packet-dcerpc-netlogon.c index 181482e684..72df487469 100644 --- a/epan/dissectors/packet-dcerpc-netlogon.c +++ b/epan/dissectors/packet-dcerpc-netlogon.c @@ -42,7 +42,6 @@ static int hf_netlogon_group_attrs_mandatory = -1; static int hf_netlogon_group_attrs_enabled_by_default = -1; static int hf_netlogon_group_attrs_enabled = -1; static int hf_netlogon_opnum = -1; -static int hf_netlogon_guid = -1; static int hf_netlogon_rc = -1; static int hf_netlogon_len = -1; static int hf_netlogon_sensitive_data_flag = -1; @@ -4893,16 +4892,6 @@ netlogon_dissect_UNICODE_MULTI(tvbuff_t *tvb, int offset, return offset; } -int -dissect_nt_GUID(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - guint8 *drep) -{ - offset=dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_netlogon_guid, NULL); - - return offset; -} - static int netlogon_dissect_DOMAIN_CONTROLLER_INFO(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, @@ -7429,10 +7418,6 @@ static hf_register_info hf[] = { { "Audit Retention Period", "netlogon.audit_retention_period", FT_RELATIVE_TIME, BASE_NONE, NULL, 0, "Audit retention period", HFILL }}, - { &hf_netlogon_guid, - { "GUID", "netlogon.guid", FT_STRING, BASE_NONE, - NULL, 0x0, "GUID (uuid for groups?)", HFILL }}, - { &hf_netlogon_timelimit, { "Time Limit", "netlogon.time_limit", FT_RELATIVE_TIME, BASE_NONE, NULL, 0, "", HFILL }}, diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index 7f018fd59e..c4d32ec63e 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -323,6 +323,18 @@ dissect_ndr_counted_ascii_string(tvbuff_t *tvb, int offset, tvb, offset, pinfo, tree, drep, hf_index, cb_str_postprocess, GINT_TO_POINTER(2 + levels)); } +static int hf_nt_guid = -1; + +int +dissect_nt_GUID(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, + guint8 *drep) +{ + offset=dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, hf_nt_guid, NULL); + + return offset; +} + /* This function is used to dissect a DCERPC encoded 64 bit time value. XXX it should be fixed both here and in dissect_nt_64bit_time so it can handle both BIG and LITTLE endian encodings @@ -1486,6 +1498,11 @@ void dcerpc_smb_init(int proto_dcerpc) NULL, 0x0, "Length of string in short integers", HFILL }}, + /* GUIDs */ + { &hf_nt_guid, + { "GUID", "nt.guid", FT_STRING, BASE_NONE, + NULL, 0x0, "GUID (uuid for groups?)", HFILL }}, + /* Policy handles */ { &hf_nt_policy_open_frame, diff --git a/epan/dissectors/packet-dcerpc-nt.h b/epan/dissectors/packet-dcerpc-nt.h index b48f1a4025..6c54a57786 100644 --- a/epan/dissectors/packet-dcerpc-nt.h +++ b/epan/dissectors/packet-dcerpc-nt.h @@ -109,6 +109,12 @@ dissect_ndr_counted_byte_array_cb(tvbuff_t *tvb, int offset, int dissect_ndr_nt_acct_ctrl(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep); + +int +dissect_nt_GUID(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, + guint8 *drep); + int dissect_ndr_nt_NTTIME (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, -- cgit v1.2.3