diff options
author | Tim Potter <tpot@samba.org> | 2003-01-11 04:35:57 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-01-11 04:35:57 +0000 |
commit | 56b60052cd95d5f65e906392457520b7476b2df6 (patch) | |
tree | 0901e14405d99d511f88e5e0a12aba783b35b59f | |
parent | 855f004140619c58d21cea5b3a0ac5a209dea4e3 (diff) |
Convert some incidental prs_* calls to dissect_dcerpc_*
equivalents.
svn path=/trunk/; revision=6898
-rw-r--r-- | packet-dcerpc-samr.c | 7 | ||||
-rw-r--r-- | packet-dcerpc-srvsvc.c | 46 |
2 files changed, 13 insertions, 40 deletions
diff --git a/packet-dcerpc-samr.c b/packet-dcerpc-samr.c index 9cca006ddf..3b28ed24d1 100644 --- a/packet-dcerpc-samr.c +++ b/packet-dcerpc-samr.c @@ -3,7 +3,7 @@ * Copyright 2001, Tim Potter <tpot@samba.org> * 2002 Added all command dissectors Ronnie Sahlberg * - * $Id: packet-dcerpc-samr.c,v 1.63 2002/12/11 19:31:02 guy Exp $ + * $Id: packet-dcerpc-samr.c,v 1.64 2003/01/11 04:35:57 tpot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -129,6 +129,7 @@ static int hf_samr_unknown_string = -1; static int hf_samr_unknown_time = -1; /* these are used by functions in packet-dcerpc-nt.c */ +int hf_nt_str = -1; int hf_nt_str_len = -1; int hf_nt_str_off = -1; int hf_nt_str_max_len = -1; @@ -5201,6 +5202,10 @@ proto_register_dcerpc_samr(void) { "Size", "nt.string.size", FT_UINT16, BASE_DEC, NULL, 0x0, "Size of string in bytes", HFILL }}, + { &hf_nt_str, + { "String", "nt.str.", FT_STRING, BASE_NONE, + NULL, 0x0, "String data", HFILL }}, + { &hf_nt_str_len, { "Length", "nt.str.len", FT_UINT32, BASE_DEC, NULL, 0x0, "Length of string in short integers", HFILL }}, diff --git a/packet-dcerpc-srvsvc.c b/packet-dcerpc-srvsvc.c index 6b6532ff67..67820dfa05 100644 --- a/packet-dcerpc-srvsvc.c +++ b/packet-dcerpc-srvsvc.c @@ -10,7 +10,7 @@ * sources. * * - * $Id: packet-dcerpc-srvsvc.c,v 1.44 2002/09/05 00:17:05 tpot Exp $ + * $Id: packet-dcerpc-srvsvc.c,v 1.45 2003/01/11 04:35:57 tpot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -5679,9 +5679,6 @@ srvsvc_dissect_DISK_INFO_0(tvbuff_t *tvb, int offset, { guint32 len; dcerpc_info *di; - int old_offset; - int data16_offset; - char *text; di=pinfo->private_data; if(di->conformant_run){ @@ -5693,15 +5690,9 @@ srvsvc_dissect_DISK_INFO_0(tvbuff_t *tvb, int offset, offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_srvsvc_disk_name_len, &len); - old_offset=offset; - offset = prs_uint16s(tvb, offset, pinfo, tree, len, &data16_offset, - NULL); - text = fake_unicode(tvb, data16_offset, len); + offset = dissect_ndr_uint16s( + tvb, offset, pinfo, tree, drep, hf_srvsvc_disk_name, len); - proto_tree_add_string(tree, hf_srvsvc_disk_name, tvb, old_offset, - offset-old_offset, text); - - g_free(text); return offset; } static int @@ -6506,9 +6497,6 @@ srvsvc_dissect_netrpathcanonicalize_reply(tvbuff_t *tvb, int offset, { guint32 len; dcerpc_info *di; - int old_offset; - int data16_offset; - char *text; di=pinfo->private_data; if(di->conformant_run){ @@ -6520,17 +6508,8 @@ srvsvc_dissect_netrpathcanonicalize_reply(tvbuff_t *tvb, int offset, offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_srvsvc_path_len, &len); - old_offset=offset; - offset = prs_uint16s(tvb, offset, pinfo, tree, len, &data16_offset, - NULL); - text = fake_unicode(tvb, data16_offset, len); - - proto_tree_add_string(tree, hf_srvsvc_path, tvb, old_offset, - offset-old_offset, text); - - g_free(text); - - + offset = dissect_ndr_uint16s( + tvb, offset, pinfo, tree, drep, hf_srvsvc_path, len); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_srvsvc_path_type, NULL); @@ -6676,9 +6655,6 @@ srvsvc_dissect_netrnamecanonicalize_reply(tvbuff_t *tvb, int offset, { guint32 len; dcerpc_info *di; - int old_offset; - int data16_offset; - char *text; di=pinfo->private_data; if(di->conformant_run){ @@ -6690,16 +6666,8 @@ srvsvc_dissect_netrnamecanonicalize_reply(tvbuff_t *tvb, int offset, offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_srvsvc_path_len, &len); - old_offset=offset; - offset = prs_uint16s(tvb, offset, pinfo, tree, len, &data16_offset, - NULL); - text = fake_unicode(tvb, data16_offset, len); - - proto_tree_add_string(tree, hf_srvsvc_path, tvb, old_offset, - offset-old_offset, text); - - g_free(text); - + offset = dissect_ndr_uint16s( + tvb, offset, pinfo, tree, drep, hf_srvsvc_path, len); offset = dissect_doserror(tvb, offset, pinfo, tree, drep, hf_srvsvc_rc, NULL); |