diff options
author | Tim Potter <tpot@samba.org> | 2003-06-26 04:30:31 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-06-26 04:30:31 +0000 |
commit | 623f5b865d67fbdd54811628579feac4226c5a0b (patch) | |
tree | 6693a34e2ad66d7b8e9a1c29a3cb6ef9d391dd18 /packet-dcerpc-rs_pgo.c | |
parent | 599a7bfd3968aefe1f38b52f7cded11a6367b2f9 (diff) | |
download | wireshark-623f5b865d67fbdd54811628579feac4226c5a0b.tar.gz wireshark-623f5b865d67fbdd54811628579feac4226c5a0b.tar.bz2 wireshark-623f5b865d67fbdd54811628579feac4226c5a0b.zip |
Dynamically create DCERPC opnum value_strings from the subdissector
list rather than duplicating this information in the dissector. Some
of the opnum strings were starting to get out of date as developers
forgot to update the information in both places.
svn path=/trunk/; revision=7936
Diffstat (limited to 'packet-dcerpc-rs_pgo.c')
-rw-r--r-- | packet-dcerpc-rs_pgo.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/packet-dcerpc-rs_pgo.c b/packet-dcerpc-rs_pgo.c index 7eaa081d86..9bb1bd51e6 100644 --- a/packet-dcerpc-rs_pgo.c +++ b/packet-dcerpc-rs_pgo.c @@ -5,7 +5,7 @@ * This information is based off the released idl files from opengroup. * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz security/idl/rs_pgo.idl * - * $Id: packet-dcerpc-rs_pgo.c,v 1.3 2002/11/28 04:57:43 guy Exp $ + * $Id: packet-dcerpc-rs_pgo.c,v 1.4 2003/06/26 04:30:29 tpot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -207,27 +207,12 @@ static dcerpc_sub_dissector rs_pgo_dissectors[] = { { 0, NULL, NULL, NULL } }; -static const value_string rs_pgo_opnum_vals[] = { - { 0, "rs_pgo_add" }, - { 1, "rs_pgo_delete" }, - { 2, "rs_pgo_replace" }, - { 3, "rs_pgo_rename" }, - { 4, "rs_pgo_get" }, - { 5, "rs_pgo_key_transfer" }, - { 6, "rs_pgo_add_member" }, - { 7, "rs_pgo_delete_member" }, - { 8, "rs_pgo_is_member" }, - { 9, "rs_pgo_get_members" }, - { 0, NULL } -}; - void proto_register_rs_pgo (void) { static hf_register_info hf[] = { { &hf_rs_pgo_opnum, - { "Operation", "rs_pgo.opnum", FT_UINT16, BASE_DEC, - VALS(rs_pgo_opnum_vals), 0x0, "Operation", HFILL }}, + { "Operation", "rs_pgo.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }}, { &hf_rs_pgo_get_members_rqst_name_domain, { "Name Domain", "rs_pgo.get_members_name_domain", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }}, { &hf_rs_pgo_get_members_rqst_sec_rgy_name_max_len, @@ -281,6 +266,14 @@ proto_register_rs_pgo (void) void proto_reg_handoff_rs_pgo (void) { + header_field_info *hf_info; + /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_pgo, ett_rs_pgo, &uuid_rs_pgo, ver_rs_pgo, rs_pgo_dissectors, hf_rs_pgo_opnum); + + /* Set opnum strings from subdissector list */ + + hf_info = proto_registrar_get_nth(hf_rs_pgo_opnum); + hf_info->strings = value_string_from_subdissectors( + rs_pgo_dissectors, array_length(rs_pgo_dissectors)); } |