diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-10-31 02:39:39 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-10-31 02:39:39 +0000 |
commit | 7cd29e879e7257ffffa048018d355762884a3caa (patch) | |
tree | 64e68a2c0752ea576e22c9e33a92cb994f6ffc6d /epan/dissectors/packet-dcerpc-rs_pgo.c | |
parent | a522ab7fad6de93b0cbed93889d6adfc20c7442c (diff) | |
download | wireshark-7cd29e879e7257ffffa048018d355762884a3caa.tar.gz |
Add a "hf_sec_rgy_pname_t_size" hf_ value and corresponding field, and
use it ("sec_rgy_pname_t_size" had been used as an hf_ value, but it's
just a #define).
Fix the code for some strings to advance the offset by the string size
regardless of whether it's > 1 or not.
svn path=/trunk/; revision=12454
Diffstat (limited to 'epan/dissectors/packet-dcerpc-rs_pgo.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc-rs_pgo.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/epan/dissectors/packet-dcerpc-rs_pgo.c b/epan/dissectors/packet-dcerpc-rs_pgo.c index 8357184eec..ed913a834e 100644 --- a/epan/dissectors/packet-dcerpc-rs_pgo.c +++ b/epan/dissectors/packet-dcerpc-rs_pgo.c @@ -92,6 +92,7 @@ static int hf_sec_rgy_domain_t = -1; static int hf_sec_rgy_name_t_principalName_string = -1; static int hf_sec_rgy_name_t_size = -1; static int hf_sec_rgy_pname_t_principalName_string = -1; +static int hf_sec_rgy_pname_t_size = -1; static int hf_sec_rgy_unix_sid_t_group = -1; static int hf_sec_rgy_unix_sid_t_org = -1; static int hf_sec_rgy_unix_sid_t_person = -1; @@ -237,7 +238,7 @@ dissect sec_rgy_pname const signed32 sec_rgy_pname_t_size = 257; * In offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, - sec_rgy_pname_t_size, &string_size); + hf_sec_rgy_pname_t_size, &string_size); if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size); if (string_size < sec_rgy_pname_t_size) @@ -251,11 +252,11 @@ dissect sec_rgy_pname const signed32 sec_rgy_pname_t_size = 257; * In if (string_size > 1) { namestring = tvb_get_ptr (tvb, offset, string_size); - offset += string_size; if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring); } + offset += string_size; } else { @@ -483,11 +484,11 @@ dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset, if (string_size > 1) { namestring = tvb_get_ptr (tvb, offset, string_size); - offset += string_size; if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring); } + offset += string_size; } else { @@ -1827,10 +1828,14 @@ proto_register_rs_pgo (void) BASE_DEC, NULL, 0x0, "", HFILL}}, {&hf_sec_rgy_pgo_flags_t, {"hf_sec_rgy_pgo_flags_t ", "hf_sec_rgy_pgo_flags_t", FT_UINT32, - BASE_DEC, NULL, 0x0, "", HFILL}}, + BASE_HEX, NULL, 0x0, "", HFILL}}, {&hf_sec_rgy_pgo_item_t, {"hf_sec_rgy_pgo_item_t ", "hf_sec_rgy_pgo_item_t", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}}, + {&hf_sec_rgy_pname_t_size, + {"hf_sec_rgy_pname_t_size", + "hf_sec_rgy_pname_t_size", FT_UINT32, BASE_DEC, NULL, + 0x0, "", HFILL}}, {&hf_sec_rgy_pname_t_principalName_string, {"hf_sec_rgy_pname_t_principalName_string ", "hf_sec_rgy_pname_t_principalName_string", FT_STRING, BASE_NONE, NULL, |