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-krb5rpc.c | |
parent | 599a7bfd3968aefe1f38b52f7cded11a6367b2f9 (diff) | |
download | wireshark-623f5b865d67fbdd54811628579feac4226c5a0b.tar.gz |
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-krb5rpc.c')
-rw-r--r-- | packet-dcerpc-krb5rpc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packet-dcerpc-krb5rpc.c b/packet-dcerpc-krb5rpc.c index f68f5e525f..c658787c17 100644 --- a/packet-dcerpc-krb5rpc.c +++ b/packet-dcerpc-krb5rpc.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/krb5rpc.idl * - * $Id: packet-dcerpc-krb5rpc.c,v 1.4 2003/01/11 07:40:09 guy Exp $ + * $Id: packet-dcerpc-krb5rpc.c,v 1.5 2003/06/26 04:30:27 tpot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -53,6 +53,7 @@ static e_uuid_t uuid_krb5rpc = 0x31} }; static guint16 ver_krb5rpc = 1; +static int hf_krb5rpc_opnum = -1; static int hf_krb5rpc_sendto_kdc_rqst_keysize = -1; static int hf_krb5rpc_sendto_kdc_rqst_spare1 = -1; static int hf_krb5rpc_sendto_kdc_resp_len = -1; @@ -157,6 +158,9 @@ void proto_register_krb5rpc (void) { static hf_register_info hf[] = { + {&hf_krb5rpc_opnum, + {"hf_krb5rpc_opnum", "hf_krb5rpc_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, + "", HFILL }}, {&hf_krb5rpc_sendto_kdc_rqst_keysize, {"hf_krb5rpc_sendto_kdc_rqst_keysize", "hf_krb5rpc_sendto_kdc_rqst_keysize", FT_UINT32, BASE_DEC, NULL, 0x0, @@ -201,7 +205,16 @@ proto_register_krb5rpc (void) void proto_reg_handoff_krb5rpc (void) { + header_field_info *hf_info; + /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_krb5rpc, ett_krb5rpc, &uuid_krb5rpc, ver_krb5rpc, - krb5rpc_dissectors, -1); + krb5rpc_dissectors, hf_krb5rpc_opnum); + + /* Set opnum strings from subdissector list */ + + hf_info = proto_registrar_get_nth(hf_krb5rpc_opnum); + hf_info->strings = value_string_from_subdissectors( + krb5rpc_dissectors, array_length(krb5rpc_dissectors)); + } |