Dynamically create DCERPC opnum value_strings from the subdissector
authortpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 26 Jun 2003 04:30:31 +0000 (04:30 +0000)
committertpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 26 Jun 2003 04:30:31 +0000 (04:30 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7936 f5534014-38df-0310-8fa8-9805f1628bb7

49 files changed:
packet-dcerpc-afs4int.c
packet-dcerpc-atsvc.c
packet-dcerpc-bossvr.c
packet-dcerpc-browser.c
packet-dcerpc-cds_clerkserver.c
packet-dcerpc-cds_solicit.c
packet-dcerpc-conv.c
packet-dcerpc-cprpc_server.c
packet-dcerpc-dfs.c
packet-dcerpc-dnsserver.c
packet-dcerpc-dtsprovider.c
packet-dcerpc-dtsstime_req.c
packet-dcerpc-epm.c
packet-dcerpc-fldb.c
packet-dcerpc-ftserver.c
packet-dcerpc-krb5rpc.c
packet-dcerpc-lsa-ds.c
packet-dcerpc-lsa.c
packet-dcerpc-mapi.c
packet-dcerpc-messenger.c
packet-dcerpc-mgmt.c
packet-dcerpc-netlogon.c
packet-dcerpc-oxid.c
packet-dcerpc-reg.c
packet-dcerpc-remact.c
packet-dcerpc-rep_proc.c
packet-dcerpc-roverride.c
packet-dcerpc-rpriv.c
packet-dcerpc-rs_acct.c
packet-dcerpc-rs_attr.c
packet-dcerpc-rs_misc.c
packet-dcerpc-rs_pgo.c
packet-dcerpc-rs_repadm.c
packet-dcerpc-rs_replist.c
packet-dcerpc-rs_unix.c
packet-dcerpc-rsec_login.c
packet-dcerpc-samr.c
packet-dcerpc-secidmap.c
packet-dcerpc-spoolss.c
packet-dcerpc-srvsvc.c
packet-dcerpc-svcctl.c
packet-dcerpc-tapi.c
packet-dcerpc-tkn4int.c
packet-dcerpc-ubikdisk.c
packet-dcerpc-ubikvote.c
packet-dcerpc-update.c
packet-dcerpc-wkssvc.c
packet-dcerpc.c
packet-dcerpc.h

index 3516525ca958071cca71d26ac2a0016f08456a4f..1521c66e406f55526b56fd92aea0a195ac2b2bbf 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/fsint/afs4int.idl
  *
- * $Id: packet-dcerpc-afs4int.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-afs4int.c,v 1.3 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -86,48 +86,13 @@ static dcerpc_sub_dissector afs4int_dissectors[] = {
        {  0, NULL, NULL, NULL }
 };
 
-
-static const value_string afs4int_opnum_vals[] = {
-       {  0, "SetContext" },
-       {  1, "LookupRoot" },
-       {  2, "FetchData" },
-       {  3, "FetchACL" },
-       {  4, "FetchStatus" },
-       {  5, "StoreData" },
-       {  6, "StoreACL" },
-       {  7, "StoreStatus" },
-       {  8, "RemoveFile" },
-       {  9, "CreateFile" },
-       { 10, "Rename" },
-       { 11, "Symlink" },
-       { 12, "HardLink" },
-       { 13, "MakeDir" },
-       { 14, "RemoveDir" },
-       { 15, "Readdir" },
-       { 16, "Lookup" },
-       { 17, "GetToken" },
-       { 18, "ReleaseTokens" },
-       { 19, "GetTime" },
-       { 20, "MakeMountPoint" },
-       { 21, "GetStatistics" },
-       { 22, "BulkFetchVV" },
-       { 23, "BulkKeepAlive" },
-       { 24, "ProcessQuota" },
-       { 25, "GetServerInterfaces" },
-       { 26, "SetParams" },
-       { 27, "BulkFetchStatus" },
-       {  0, NULL }
-};
-
-
-
 void
 proto_register_afs4int (void)
 {
        static hf_register_info hf[] = {
          { &hf_afs4int_opnum,
            { "Operation", "afs4int.opnum", FT_UINT16, BASE_DEC,
-             VALS(afs4int_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };  
 
 
@@ -142,7 +107,14 @@ proto_register_afs4int (void)
 void
 proto_reg_handoff_afs4int (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_afs4int, ett_afs4int, &uuid_afs4int, ver_afs4int, afs4int_dissectors, hf_afs4int_opnum);
-}
 
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_afs4int_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               afs4int_dissectors, array_length(afs4int_dissectors));
+}
index 97721fcbbd3e5aa1c53a9c55dfa7c59644d2da75..972965ee4284b57ac63d149c55aa395b50b249df 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \pipe\atsvc packet disassembly
  * Copyright 2003 Jean-Baptiste Marchand <jbm@hsc.fr>
  *
- * $Id: packet-dcerpc-atsvc.c,v 1.2 2003/06/06 17:09:18 sharpe Exp $
+ * $Id: packet-dcerpc-atsvc.c,v 1.3 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -484,15 +484,6 @@ static dcerpc_sub_dissector dcerpc_atsvc_dissectors[] = {
         { 0, NULL, NULL,  NULL }
 };
 
-
-static const value_string atsvc_opnum_vals[] = {
-       { ATSVC_JOB_ADD, "NetrJobAdd" },
-       { ATSVC_JOB_DEL, "NetrJobDel" },
-       { ATSVC_JOB_ENUM, "NetrJobEnum" },
-       { ATSVC_JOB_GETINFO, "NetrJobGetInfo" },
-       { 0, NULL }
-};
-
 static const value_string atsvc_job_day_of_month[] = {
        {       0x00, "n/a" },
        {       0x01, "01" },
@@ -584,7 +575,7 @@ proto_register_dcerpc_atsvc(void)
 
                { &hf_atsvc_opnum, 
                  { "Operation", "atsvc.opnum", FT_UINT16, BASE_DEC,
-                  VALS(atsvc_opnum_vals), 0x0, "Operation", HFILL }},  
+                  NULL, 0x0, "Operation", HFILL }},    
 
                {&hf_atsvc_rc,
                  { "Return code", "atsvc.rc", FT_UINT32, BASE_HEX,
@@ -683,6 +674,7 @@ proto_register_dcerpc_atsvc(void)
 void
 proto_reg_handoff_dcerpc_atsvc(void)
 {
+       header_field_info *hf_info;
 
        /* register protocol as dcerpc */
 
@@ -690,4 +682,10 @@ proto_reg_handoff_dcerpc_atsvc(void)
                proto_dcerpc_atsvc, ett_dcerpc_atsvc, &uuid_dcerpc_atsvc,
                ver_dcerpc_atsvc, dcerpc_atsvc_dissectors, hf_atsvc_opnum);
 
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_atsvc_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_atsvc_dissectors, array_length(dcerpc_atsvc_dissectors));
+
 }
index ebecc40a7a64abbc4f175b82432ccb66fbfe895d..bae439cd3d9191029a86ab898662fabf0945e6ac 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/bosserver/bbos_ncs_interface.idl
  *
- * $Id: packet-dcerpc-bossvr.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-bossvr.c,v 1.3 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -91,52 +91,13 @@ static dcerpc_sub_dissector bossvr_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string bossvr_opnum_vals[] = {
-    {  0, "GetServerStatus" },
-    {  1, "CreateBnode" },
-    {  2, "DeleteBnode" },
-    {  3, "SetStatus" },
-    {  4, "GetStatus" },
-    {  5, "EnumerateInstance" },
-    {  6, "GetInstanceInfo" },
-    {  7, "GetInstanceParm" },
-    {  8, "AddSUser" },
-    {  9, "DeleteSUser" },
-    { 10, "ListSUsers" },
-    { 11, "ListKeys" },
-    { 12, "AddKey" },
-    { 13, "DeleteKey" },
-    { 14, "GenerateKey" },
-    { 15, "GarbageCollectKeys" },
-    { 16, "GetCellName" },
-    { 17, "SetTStatus" },
-    { 18, "ShutdownAll" },
-    { 19, "RestartAll" },
-    { 20, "StartupAll" },
-    { 21, "SetNoAuthFlag" },
-    { 22, "ReBossvr" },
-    { 23, "Restart" },
-    { 24, "Install" },
-    { 25, "UnInstall" },
-    { 26, "GetDates" },
-    { 27, "Prune" },
-    { 28, "SetRestartTime" },
-    { 29, "GetRestartTime" },
-    { 30, "GetLog" },
-    { 31, "WaitAll" },
-    { 32, "SetDebug" },
-    { 33, "GetServerInterfaces" },
-    { 0, NULL }
-};
-
-
 void
 proto_register_bossvr (void)
 {
        static hf_register_info hf[] = {
          { &hf_bossvr_opnum,
            { "Operation", "bossvr.opnum", FT_UINT16, BASE_DEC,
-             VALS(bossvr_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -150,6 +111,14 @@ proto_register_bossvr (void)
 void
 proto_reg_handoff_bossvr (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_bossvr, ett_bossvr, &uuid_bossvr, ver_bossvr, bossvr_dissectors, hf_bossvr_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_bossvr_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               bossvr_dissectors, array_length(bossvr_dissectors));
 }
index a6d8c75f778d2708311fbe4f3a086ec98e167dc9..3153fc09c83ccdb76e6f5185258b299b515ed9dd 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC Browser packet disassembly
  * Copyright 2001, Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-browser.c,v 1.10 2003/01/30 08:19:37 guy Exp $
+ * $Id: packet-dcerpc-browser.c,v 1.11 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -39,6 +39,7 @@
 #include "smb.h"
 
 static int proto_dcerpc_browser = -1;
+static int hf_browser_opnum = -1;
 static int hf_browser_rc = -1;
 static int hf_browser_unknown_long = -1;
 static int hf_browser_unknown_hyper = -1;
@@ -1121,6 +1122,11 @@ void
 proto_register_dcerpc_browser(void)
 {
 static hf_register_info hf[] = {
+
+       { &hf_browser_opnum, { 
+               "Operation", "rpc_browser.opnum", FT_UINT16, BASE_DEC,
+               NULL, 0x0, "Operation", HFILL }},
+
        { &hf_browser_rc, {
                "Return code", "rpc_browser.rc", FT_UINT32, BASE_HEX,
                VALS(NT_errors), 0x0, "Browser return code", HFILL }},
@@ -1157,9 +1163,17 @@ static hf_register_info hf[] = {
 void
 proto_reg_handoff_dcerpc_browser(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_browser, ett_dcerpc_browser,
                          &uuid_dcerpc_browser, ver_dcerpc_browser,
-                         dcerpc_browser_dissectors, -1);
+                         dcerpc_browser_dissectors, hf_browser_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_browser_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_browser_dissectors, array_length(dcerpc_browser_dissectors));
 }
index 4c98b13342dde024a99c0640eb9fb49aefe3dab2..b7397c6018a71c255c823eb7b5c795675940ab72 100644 (file)
@@ -6,7 +6,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/directory.tar.gz directory/cds/stubs/cds_clerkserver.idl
  *      
- * $Id: packet-dcerpc-cds_clerkserver.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-cds_clerkserver.c,v 1.3 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -86,45 +86,13 @@ static dcerpc_sub_dissector cds_clerkserver_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-
-static const value_string cds_clerkserver_opnum_vals[] = {
-    {  0, "AddReplica" },
-    {  1, "AllowClearinghouses" },
-    {  2, "Combine" },
-    {  3, "CreateChild" },
-    {  4, "CreateDirectory" },
-    {  5, "CreateSoftLink" },
-    {  6, "CreateObject" },
-    {  7, "DeleteChild" },
-    {  8, "DeleteObject" },
-    {  9, "DeleteSoftLink" },
-    { 10, "DeleteDirectory" },
-    { 11, "DisallowClearinghouses" },
-    { 12, "DoUpdate" },
-    { 13, "EnumerateAttributes" },
-    { 14, "EnumerateChildren" },
-    { 15, "EnumerateObjects" },
-    { 16, "EnumerateSoftLinks" },
-    { 17, "LinkReplica" },
-    { 18, "ModifyAttribute" },
-    { 19, "ModifyReplica" },
-    { 20, "NewEpoch" },
-    { 21, "ReadAttribute" },
-    { 22, "RemoveReplica" },
-    { 23, "ResolveName" },
-    { 24, "Skulk" },
-    { 25, "TestAttribute" },
-    { 26, "TestGroup" },
-    { 0, NULL }
-};
-
 void
 proto_register_cds_clerkserver (void)
 {
        static hf_register_info hf[] = {
          { &hf_cds_clerkserver_opnum,
            { "Operation", "cds_clerkserver.opnum", FT_UINT16, BASE_DEC,
-             VALS(cds_clerkserver_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -138,6 +106,14 @@ proto_register_cds_clerkserver (void)
 void
 proto_reg_handoff_cds_clerkserver (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_cds_clerkserver, ett_cds_clerkserver, &uuid_cds_clerkserver, ver_cds_clerkserver, cds_clerkserver_dissectors, hf_cds_clerkserver_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_cds_clerkserver_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               cds_clerkserver_dissectors, array_length(cds_clerkserver_dissectors));
 }
index afbe7272d5c8bd50dd97c7812bb6d9baf086cb2d..be4bc0c2e6d95d0c6a181d95673ff1644fc8f642 100644 (file)
@@ -4,7 +4,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/directory.tar.gz directory/cds/stubs/cds_solicit.idl
  *      
- * $Id: packet-dcerpc-cds_solicit.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-cds_solicit.c,v 1.3 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -59,19 +59,12 @@ static dcerpc_sub_dissector cds_solicit_dissectors[] = {
        { 0, NULL, NULL, NULL }
 };
 
-static const value_string cds_solicit_opnum_vals[] = {
-       { 0, "cds_Solicit" },
-       { 1, "cds_Advertise" },
-       { 2, "cds_SolicitServer" },
-       { 0, NULL }
-};
-
 void
 proto_register_cds_solicit (void)
 {
        static hf_register_info hf[] = {
        { &hf_cds_solicit_opnum,
-               { "Operation", "cds_solicit.opnum", FT_UINT16, BASE_DEC, VALS(cds_solicit_opnum_vals), 0x0, "Operation", HFILL }},
+               { "Operation", "cds_solicit.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
        };
 
        static gint *ett[] = {
@@ -85,6 +78,14 @@ proto_register_cds_solicit (void)
 void
 proto_reg_handoff_cds_solicit (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_cds_solicit, ett_cds_solicit, &uuid_cds_solicit, ver_cds_solicit, cds_solicit_dissectors, hf_cds_solicit_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_cds_solicit_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               cds_solicit_dissectors, array_length(cds_solicit_dissectors));
 }
index 5dd68faacff8157f3640f496ffe052893643f917..c189966290fc41a38ed87e35421a19094065c902 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for dcerpc conv dissection
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc-conv.c,v 1.6 2002/09/26 06:13:07 sahlberg Exp $
+ * $Id: packet-dcerpc-conv.c,v 1.7 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -171,22 +171,12 @@ static dcerpc_sub_dissector conv_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string conv_opnum_vals[] = {
-    { 0, "who_are_you" }, 
-    { 1, "who_are_you2" }, 
-    { 2, "are_you_there" },
-    { 3, "who_are_you_auth" },
-    { 4, "who_are_you_auth_more" },
-    { 0, NULL }
-};
-
-
 void
 proto_register_conv (void)
 {
        static hf_register_info hf[] = {
         { &hf_conv_opnum,
-            { "Operation", "conv.opnum", FT_UINT16, BASE_DEC, VALS(conv_opnum_vals), 0x0, "Operation", HFILL }},
+            { "Operation", "conv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
         { &hf_conv_who_are_you_resp_seq,
             {"hf_conv_who_are_you_resp_seq", "conv.who_are_you_resp_seq", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
         { &hf_conv_rc,
@@ -216,7 +206,15 @@ proto_register_conv (void)
 void
 proto_reg_handoff_conv (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_conv, ett_conv, &uuid_conv, ver_conv, conv_dissectors, hf_conv_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_conv_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               conv_dissectors, array_length(conv_dissectors));
 }
 
index 6b1511c6eea43a5f7e144c9101de80c3ff1df92b..d7e9b00df557c3715753ee8b487b46036cb32726 100644 (file)
@@ -4,7 +4,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/directory.tar.gz directory/cds/stubs/cprpc_server.idl
  *      
- * $Id: packet-dcerpc-cprpc_server.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-cprpc_server.c,v 1.3 2003/06/26 04:30:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -57,19 +57,13 @@ static dcerpc_sub_dissector cprpc_server_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string cprpc_server_opnum_vals[] = {
-    { 0, "dnscp_server" },
-    { 0, NULL }
-};
-
-
 void
 proto_register_cprpc_server (void)
 {
        static hf_register_info hf[] = {
          { &hf_cprpc_server_opnum,
            { "Operation", "cprpc_server.opnum", FT_UINT16, BASE_DEC,
-             VALS(cprpc_server_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -83,6 +77,14 @@ proto_register_cprpc_server (void)
 void
 proto_reg_handoff_cprpc_server (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_cprpc_server, ett_cprpc_server, &uuid_cprpc_server, ver_cprpc_server, cprpc_server_dissectors, hf_cprpc_server_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_cprpc_server_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               cprpc_server_dissectors, array_length(cprpc_server_dissectors));
 }
index e68378190b19ddd3d8b6a512502e64c7ee7dcf88..f6dec86238ddaa2e679f89eac07c991639f98d7d 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \\PIPE\\netdfs packet disassembly
  * Copyright 2001, Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-dfs.c,v 1.5 2002/08/28 21:00:09 jmayer Exp $
+ * $Id: packet-dcerpc-dfs.c,v 1.6 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -54,22 +54,13 @@ static dcerpc_sub_dissector dcerpc_dfs_dissectors[] = {
         {0, NULL, NULL,  NULL }
 };
 
-static const value_string dfs_opnum_vals[] = {
-        { DFS_EXIST, "Exit" },
-        { DFS_ADD, "Add" },
-        { DFS_REMOVE, "Remove" },
-        { DFS_GET_INFO, "GetInfo" },
-        { DFS_ENUM, "Enum" },
-        { 0, NULL },
-};
-
 void
 proto_register_dcerpc_dfs(void)
 {
        static hf_register_info hf[] = {
                { &hf_dfs_opnum,
                  { "Operation", "dfs.opnum", FT_UINT16, BASE_DEC,
-                   VALS(dfs_opnum_vals), 0x0, "Operation", HFILL }},
+                   NULL, 0x0, "Operation", HFILL }},
        };
 
         static gint *ett[] = {
@@ -87,8 +78,16 @@ proto_register_dcerpc_dfs(void)
 void
 proto_reg_handoff_dcerpc_dfs(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_dfs, ett_dcerpc_dfs, &uuid_dcerpc_dfs,
                          ver_dcerpc_dfs, dcerpc_dfs_dissectors, hf_dfs_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_dfs_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_dfs_dissectors, array_length(dcerpc_dfs_dissectors));
 }
index 673b3d4fddc64f10f8ce4fca8b1c2ed40f048834..07321c39acc9135bd6d21460ca1dc2882ed730f5 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \PIPE\DNSSERVER packet disassembly
  * Copyright 2001, 2002 Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-dnsserver.c,v 1.1 2002/09/11 23:59:13 tpot Exp $
+ * $Id: packet-dcerpc-dnsserver.c,v 1.2 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -59,14 +59,6 @@ static dcerpc_sub_dissector dcerpc_dnsserver_dissectors[] = {
         { 0, NULL, NULL,  NULL }
 };
 
-static const value_string dnsserver_opnum_vals[] = {
-       { UNKNOWN_00, "Unknown 0x00" },
-       { UNKNOWN_01, "Unknown 0x01" },
-       { UNKNOWN_02, "Unknown 0x02" },
-       { UNKNOWN_03, "Unknown 0x03" },
-       { 0, NULL }
-};
-
 void
 proto_register_dcerpc_dnsserver(void)
 {
@@ -80,7 +72,7 @@ proto_register_dcerpc_dnsserver(void)
 
                { &hf_opnum,
                  { "Operation", "dnsserver.opnum", FT_UINT16, BASE_DEC,
-                   VALS(dnsserver_opnum_vals), 0x0, "Operation", HFILL }},
+                   NULL, 0x0, "Operation", HFILL }},
        };
 
         static gint *ett[] = {
@@ -98,9 +90,17 @@ proto_register_dcerpc_dnsserver(void)
 void
 proto_reg_handoff_dcerpc_dnsserver(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(
                proto_dcerpc_dnsserver, ett_dnsserver, &uuid_dcerpc_dnsserver,
                ver_dcerpc_dnsserver, dcerpc_dnsserver_dissectors, hf_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_dnsserver_dissectors, array_length(dcerpc_dnsserver_dissectors));
 }
index e4ed8d2e1274478126571723eec5dc9c6e0f4a58..d07c92103d8aed9d1e7096085d452cb18ada4d4a 100644 (file)
@@ -4,7 +4,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/time.tar.gz time/service/dtsprovider.idl
  *
- * $Id: packet-dcerpc-dtsprovider.c,v 1.4 2002/10/15 05:21:02 guy Exp $
+ * $Id: packet-dcerpc-dtsprovider.c,v 1.5 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -59,19 +59,13 @@ static dcerpc_sub_dissector dtsprovider_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string dtsprovider_opnum_vals[] = {
-    { 0, "ContactProvider" },
-    { 1, "ServerRequestProviderTime" },
-    { 0, NULL }
-};
-
 void
 proto_register_dtsprovider (void)
 {
        static hf_register_info hf[] = {
          { &hf_dtsprovider_opnum,
            { "Operation", "dtsprovider.opnum", FT_UINT16, BASE_DEC,
-             VALS(dtsprovider_opnum_vals), 0x0, "Operation", HFILL }},
+             NULL, 0x0, "Operation", HFILL }},
          { &hf_dtsprovider_status,
            { "Status", "dtsprovider.status", FT_UINT32, BASE_DEC,
              VALS(dce_error_vals), 0x0, "Return code, status of executed command", HFILL }}
@@ -88,6 +82,14 @@ proto_register_dtsprovider (void)
 void
 proto_reg_handoff_dtsprovider (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_dtsprovider, ett_dtsprovider, &uuid_dtsprovider, ver_dtsprovider, dtsprovider_dissectors, hf_dtsprovider_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_dtsprovider_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dtsprovider_dissectors, array_length(dtsprovider_dissectors));
 }
index a2238bfb287bf85bb80fe647f6eaf13bec68f498..d4b7187c42388e5ae516c6ab8b495f74fe78dbf1 100644 (file)
@@ -4,7 +4,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/time.tar.gz time/service/dtsstime_req.idl
  *           
- * $Id: packet-dcerpc-dtsstime_req.c,v 1.3 2002/10/15 05:21:02 guy Exp $
+ * $Id: packet-dcerpc-dtsstime_req.c,v 1.4 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -58,18 +58,12 @@ static dcerpc_sub_dissector dtsstime_req_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string dtsstime_req_opnum_vals[] = {
-    { 0, "ClerkRequestTime" },
-    { 1, "ServerRequestTime" },
-    { 0, NULL }
-};
-
 void
 proto_register_dtsstime_req (void)
 {
        static hf_register_info hf[] = {
        { &hf_dtsstime_req_opnum,
-               { "Operation", "dtsstime_req.opnum", FT_UINT16, BASE_DEC, VALS(dtsstime_req_opnum_vals), 0x0, "Operation", HFILL }}
+               { "Operation", "dtsstime_req.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -83,6 +77,14 @@ proto_register_dtsstime_req (void)
 void
 proto_reg_handoff_dtsstime_req (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_dtsstime_req, ett_dtsstime_req, &uuid_dtsstime_req, ver_dtsstime_req, dtsstime_req_dissectors, hf_dtsstime_req_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_dtsstime_req_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dtsstime_req_dissectors, array_length(dtsstime_req_dissectors));
 }
index 2152981fb5923186c6528fe6b522d05ab1d40afa..7b35248a8f04ce73ee5f81c8eb758143774c6b92 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for dcerpc endpoint mapper dissection
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc-epm.c,v 1.19 2003/01/28 06:39:39 tpot Exp $
+ * $Id: packet-dcerpc-epm.c,v 1.20 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -611,24 +611,13 @@ static dcerpc_sub_dissector epm_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string epm_opnum_vals[] = {
-       { 0, "Insert" },
-       { 1, "Delete" },
-       { 2, "Lookup" },
-       { 3, "Map" },
-       { 4, "LookupHandleFree" },
-       { 5, "InqObject" },
-       { 6, "MgmtDelete" },
-       { 0, NULL }
-};
-
 void
 proto_register_epm (void)
 {
        static hf_register_info hf[] = {
         { &hf_epm_opnum,
          { "Operation", "epm.opnum", FT_UINT16, BASE_DEC,
-           VALS(epm_opnum_vals), 0x0, "Operation", HFILL }},
+           NULL, 0x0, "Operation", HFILL }},
         { &hf_epm_inquiry_type,
           { "Inquiry type", "epm.inq_type", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
         { &hf_epm_object,
@@ -700,6 +689,14 @@ proto_register_epm (void)
 void
 proto_reg_handoff_epm (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_epm, ett_epm, &uuid_epm, ver_epm, epm_dissectors, hf_epm_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_epm_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               epm_dissectors, array_length(epm_dissectors));
 }
index f4c5cb13d34109b064c057a9533dbf56f2d29c03..0800fabc4f4f2d1c5cede02db10ce109ea398ccc 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/flserver/afsvl_proc.idl
  *
- * $Id: packet-dcerpc-fldb.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-fldb.c,v 1.3 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -87,49 +87,13 @@ static dcerpc_sub_dissector fldb_dissectors[] = {
         { 0, NULL, NULL, NULL }
 };
 
-
-
-static const value_string fldb_opnum_vals[] = {
-       {  0, "GetEntryByID" },
-       {  1, "GetEntryByName" },
-       {  2, "Probe" },
-       {  3, "GetCellInfo" },
-       {  4, "GetNextServersByID" },
-       {  5, "GetNextServersByName" },
-       {  6, "GetSiteInfo" },
-       {  7, "GetCEntryByID" },
-       {  8, "GetCEntryByName" },
-       {  9, "GetCNextServersByID" },
-       { 10, "GetCNextServersByName" },
-       { 11, "ExpandSiteCookie" },
-       { 12, "GetServerInterfaces" },
-       { 13, "CreateEntry" },
-       { 14, "DeleteEntry" },
-       { 15, "GetNewVolumeId" },
-       { 16, "ReplaceEntry" },
-       { 17, "SetLock" },
-       { 18, "ReleaseLock" },
-       { 19, "ListEntry" },
-       { 20, "ListByAttributes" },
-       { 21, "GetStats" },
-       { 22, "AddAddress" },
-       { 23, "RemoveAddress" },
-       { 24, "ChangeAddress" },
-       { 25, "GenerateSites" },
-       { 26, "GetNewVolumeIds" },
-       { 27, "CreateServer" },
-       { 28, "AlterServer" },
-        { 0, NULL }
-};
-
-
 void
 proto_register_fldb (void)
 {
        static hf_register_info hf[] = {
          { &hf_fldb_opnum,
            { "Operation", "fldb.opnum", FT_UINT16, BASE_DEC,
-             VALS(fldb_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -143,6 +107,14 @@ proto_register_fldb (void)
 void
 proto_reg_handoff_fldb (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_fldb, ett_fldb, &uuid_fldb, ver_fldb, fldb_dissectors, hf_fldb_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_fldb_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               fldb_dissectors, array_length(fldb_dissectors));
 }
index fa586cd8f9b34bea35306f8609c01ff7c572202e..f4c518648635b148567ef5c2f0df0566331d577d 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tgz file/ftserver/ftserver_proc.idl
  *
- * $Id: packet-dcerpc-ftserver.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-ftserver.c,v 1.3 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -79,39 +79,13 @@ static dcerpc_sub_dissector ftserver_dissectors[] = {
        { 0, NULL, NULL, NULL }
 };
 
-
-static const value_string ftserver_opnum_vals[] = {
-       {  0, "CreateTrans" },
-       {  1, "AbortTrans" },
-       {  2, "DeleteTrans" },
-       {  3, "CreateVolume" },
-       {  4, "DeleteVolume" },
-       {  5, "Dump" },
-       {  6, "Restore" },
-       {  7, "Forward" },
-       {  8, "Clone" },
-       {  9, "ReClone" },
-       { 10, "GetFlags" },
-       { 11, "SetFlags" },
-       { 12, "GetStatus" },
-       { 13, "SetStatus" },
-       { 14, "ListVolumes" },
-       { 15, "ListAggregates" },
-       { 16, "AggregateInfo" },
-       { 17, "Monitor" },
-       { 18, "GetOneVolStatus" },
-       { 19, "GetServerInterfaces" },
-       { 20, "SwapIDs" },
-       { 0, NULL }
-};
-
 void
 proto_register_ftserver (void)
 {
        static hf_register_info hf[] = {
          { &hf_ftserver_opnum,
            { "Operation", "ftserver.opnum", FT_UINT16, BASE_DEC,
-             VALS(ftserver_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -125,6 +99,14 @@ proto_register_ftserver (void)
 void
 proto_reg_handoff_ftserver (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_ftserver, ett_ftserver, &uuid_ftserver, ver_ftserver, ftserver_dissectors, hf_ftserver_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_ftserver_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               ftserver_dissectors, array_length(ftserver_dissectors));
 }
index f68f5e525fa3a1a149fa1065a8cbe661f921a19e..c658787c1730f0c3c8ae20da544c57898052e888 100644 (file)
@@ -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));
+
 }
index 438bf90b519423e5601b83ee05025cb4f887551a..f96c4e7d723619a02b4cc9332f109a28b71f2734 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2002-2003, Tim Potter <tpot@samba.org>
  * Copyright 2002, Jim McDonough <jmcd@samba.org>
  *
- * $Id: packet-dcerpc-lsa-ds.c,v 1.10 2003/04/27 04:33:09 tpot Exp $
+ * $Id: packet-dcerpc-lsa-ds.c,v 1.11 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -216,12 +216,6 @@ lsa_ds_dissect_role_get_dom_info_reply(tvbuff_t *tvb, int offset,
        return offset;
 }
 
-
-static const value_string lsa_ds_opnum_vals[] = {
-       { LSA_DS_DSROLEGETDOMINFO, "DsRoleGetDomInfo" },
-       { 0, NULL }
-};
-
 static const value_string lsa_ds_dominfo_levels[] = {
        { LSA_DS_DSROLE_BASIC_INFO, "DsRoleBasicInfo"},
        { LSA_DS_DSROLE_UPGRADE_STATUS, "DsRoleUpgradeStatus"},
@@ -266,7 +260,7 @@ proto_register_dcerpc_lsa_ds(void)
 
        { &hf_lsa_ds_opnum,
          { "Operation", "ls_ads.opnum", FT_UINT16, BASE_DEC,
-           VALS(lsa_ds_opnum_vals), 0x0, "Operation", HFILL }},
+           NULL, 0x0, "Operation", HFILL }},
        
        { &hf_lsa_ds_dominfo_level,
          { "Level", "lsa_ds.dominfo.level", FT_UINT16, BASE_DEC,
@@ -346,9 +340,17 @@ static dcerpc_sub_dissector lsa_ds_dissectors[] = {
 void
 proto_reg_handoff_dcerpc_lsa_ds(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_lsa_ds, ett_dcerpc_lsa_ds, 
                         &uuid_dcerpc_lsa_ds, ver_dcerpc_lsa_ds, 
-                        lsa_ds_dissectors, -1);
+                        lsa_ds_dissectors, hf_lsa_ds_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_lsa_ds_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               lsa_ds_dissectors, array_length(lsa_ds_dissectors));
 }
index f511c4f5b8baf07dd249672e2208ad8226de9e28..5c9fc6aa5e308e677574b76345b48379a41e667d 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002  Added LSA command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-lsa.c,v 1.85 2003/06/05 04:22:02 guy Exp $
+ * $Id: packet-dcerpc-lsa.c,v 1.86 2003/06/26 04:30:27 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -4059,78 +4059,13 @@ static dcerpc_sub_dissector dcerpc_lsa_dissectors[] = {
        {0, NULL, NULL, NULL}
 };
 
-static const value_string lsa_opnum_vals[] = {
-       { LSA_LSACLOSE, "Close" },
-       { LSA_LSADELETE, "Delete" },
-       { LSA_LSAENUMERATEPRIVILEGES, "EnumPrivs" },
-       { LSA_LSAQUERYSECURITYOBJECT, "QuerySecObject" },
-       { LSA_LSASETSECURITYOBJECT, "SetSecObject" },
-       { LSA_LSACHANGEPASSWORD, "ChangePassword" },
-       { LSA_LSAOPENPOLICY, "OpenPolicy" },
-       { LSA_LSAQUERYINFORMATIONPOLICY, "QueryInfoPolicy" },
-       { LSA_LSASETINFORMATIONPOLICY, "SetInfoPolicy" },
-       { LSA_LSACLEARAUDITLOG, "ClearAuditLog" },
-       { LSA_LSACREATEACCOUNT, "CreateAccount" },
-       { LSA_LSAENUMERATEACCOUNTS, "EnumAccounts" },
-       { LSA_LSACREATETRUSTEDDOMAIN, "CreateTrustedDomain" },
-       { LSA_LSAENUMERATETRUSTEDDOMAINS, "EnumTrustedDomains" },
-       { LSA_LSALOOKUPNAMES, "LookupNames" },
-       { LSA_LSALOOKUPSIDS, "LookupSIDs" },
-       { LSA_LSACREATESECRET, "CreateSecret" },
-       { LSA_LSAOPENACCOUNT, "OpenAccount" },
-       { LSA_LSAENUMERATEPRIVILEGESACCOUNT, "EnumPrivsAccount" },
-       { LSA_LSAADDPRIVILEGESTOACCOUNT, "AddPrivsToAccount" },
-       { LSA_LSAREMOVEPRIVILEGESFROMACCOUNT, "MovePrivsFromAccount" },
-       { LSA_LSAGETQUOTASFORACCOUNT, "GetQuotasForAccount" },
-       { LSA_LSASETQUOTASFORACCOUNT, "SetQuotasForAccount" },
-       { LSA_LSAGETSYSTEMACCESSACCOUNT, "GetSystemAccessAccount" },
-       { LSA_LSASETSYSTEMACCESSACCOUNT, "SetSystemAccessAccount" },
-       { LSA_LSAOPENTRUSTEDDOMAIN, "OpenTrustedDomain" },
-       { LSA_LSAQUERYINFOTRUSTEDDOMAIN, "QueryInfoTrustedDomain" },
-       { LSA_LSASETINFORMATIONTRUSTEDDOMAIN, "SetInfoTrustedDomain" },
-       { LSA_LSAOPENSECRET, "OpenSecret" },
-       { LSA_LSASETSECRET, "SetSecret" },
-       { LSA_LSAQUERYSECRET, "QuerySecret" },
-       { LSA_LSALOOKUPPRIVILEGEVALUE, "LookupPrivValue" },
-       { LSA_LSALOOKUPPRIVILEGENAME, "LookupPrivName" },
-       { LSA_LSALOOKUPPRIVILEGEDISPLAYNAME, "LookupPrivDispName" },
-       { LSA_LSADELETEOBJECT, "DeleteObject" },
-       { LSA_LSAENUMERATEACCOUNTSWITHUSERRIGHT, "EnumAccountsWithUserRight" },
-       { LSA_LSAENUMERATEACCOUNTRIGHTS, "EnumAccountRights" },
-       { LSA_LSAADDACCOUNTRIGHTS, "AddAccountRights" },
-       { LSA_LSAREMOVEACCOUNTRIGHTS, "RemoveAccountRights" },
-       { LSA_LSAQUERYTRUSTEDDOMAININFO, "QueryTrustedDomainInfo" },
-       { LSA_LSASETTRUSTEDDOMAININFO, "SetTrustedDomainInfo" },
-       { LSA_LSADELETETRUSTEDDOMAIN, "DeleteTrsutedDomain" },
-       { LSA_LSASTOREPRIVATEDATA, "StorePrivateData" },
-       { LSA_LSARETRIEVEPRIVATEDATA, "RetrievePrivateData" },
-       { LSA_LSAOPENPOLICY2, "OpenPolicy2" },
-       { LSA_LSAGETUSERNAME, "GetUsername" },
-       { LSA_LSAQUERYINFORMATIONPOLICY2, "QueryInformationPolicy2" },
-       { LSA_LSASETINFORMATIONPOLICY2, "SetInformationPolicy2" },
-       { LSA_LSAQUERYTRUSTEDDOMAININFOBYNAME, "QueryTrustedDomainInfoByName" },
-       { LSA_LSASETTRUSTEDDOMAININFOBYNAME, "SetTrustedDomainInfoByName" },
-       { LSA_LSAENUMERATETRUSTEDDOMAINSEX, "EnumTrustedDomainsEx" },
-       { LSA_LSACREATETRUSTEDDOMAINEX, "CreateTrustedDomainEx" },
-       { LSA_LSACLOSETRUSTEDDOMAINEX, "CloseTrustedDomainEx" },
-       { LSA_LSAQUERYDOMAININFORMATIONPOLICY, "QueryDomainInfoPolicy" },
-       { LSA_LSASETDOMAININFORMATIONPOLICY, "SetDomainInfoPolicy" },
-       { LSA_LSAOPENTRUSTEDDOMAINBYNAME, "OpenTrustedDomainByName" },
-       { LSA_LSAFUNCTION_38, "LSAFUNCTION_38" },
-       { LSA_LSALOOKUPSIDS2, "LookupSIDs2" },
-       { LSA_LSALOOKUPNAMES2, "LookupNames2" },
-       { LSA_LSAFUNCTION_3B, "LSAFUNCTION_3B" },
-       { 0, NULL }
-};
-
 void
 proto_register_dcerpc_lsa(void)
 {
         static hf_register_info hf[] = {
 
         { &hf_lsa_opnum,
-         { "Operation", "lsa.opnum", FT_UINT16, BASE_DEC,
-           VALS(lsa_opnum_vals), 0x0, "Operation", HFILL }},
+         { "Operation", "lsa.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
 
        { &hf_lsa_unknown_string,
                { "Unknown string", "lsa.unknown_string", FT_STRING, BASE_NONE,
@@ -4566,8 +4501,16 @@ static guint16 ver_dcerpc_lsa = 0;
 void
 proto_reg_handoff_dcerpc_lsa(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_lsa, ett_dcerpc_lsa, &uuid_dcerpc_lsa,
                          ver_dcerpc_lsa, dcerpc_lsa_dissectors, hf_lsa_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_lsa_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_lsa_dissectors, array_length(dcerpc_lsa_dissectors));
 }
index 834ec209a337204407885906fbf73d60b2e0fb5c..f1e894259af9db29b87c5ec6a1cac81e87074415 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for MS Exchange MAPI
  * Copyright 2002, Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-mapi.c,v 1.22 2003/06/05 04:22:03 guy Exp $
+ * $Id: packet-dcerpc-mapi.c,v 1.23 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -36,6 +36,7 @@
 #include "prefs.h"
 
 static int proto_dcerpc_mapi = -1;
+static int hf_mapi_opnum = -1;
 static int hf_mapi_unknown_string = -1;
 static int hf_mapi_unknown_short = -1;
 static int hf_mapi_unknown_long = -1;
@@ -374,6 +375,10 @@ proto_register_dcerpc_mapi(void)
 {
 
 static hf_register_info hf[] = {
+       { &hf_mapi_opnum,
+               { "Operation", "mapi.opnum", FT_UINT16, BASE_DEC,
+                 NULL, 0x0, "", HFILL }},
+
        { &hf_mapi_hnd,
                { "Context Handle", "mapi.hnd", FT_BYTES, BASE_NONE,
                NULL, 0x0, "", HFILL }},
@@ -455,9 +460,17 @@ static hf_register_info hf[] = {
 void
 proto_reg_handoff_dcerpc_mapi(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_mapi, ett_dcerpc_mapi,
                          &uuid_dcerpc_mapi, ver_dcerpc_mapi,
-                         dcerpc_mapi_dissectors, -1);
+                         dcerpc_mapi_dissectors, hf_mapi_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_mapi_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_mapi_dissectors, array_length(dcerpc_mapi_dissectors));
 }
index 4b04f54ceaf220b354392d241a4cdbb0dd35b3ab..c878618040ade2fe10631de609524f072b9d8a5b 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \PIPE\messenger packet disassembly
  * Copyright 2003 Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-messenger.c,v 1.1 2003/06/25 10:33:10 sahlberg Exp $
+ * $Id: packet-dcerpc-messenger.c,v 1.2 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -48,10 +48,6 @@ static dcerpc_sub_dissector dcerpc_messenger_dissectors[] = {
         {0, NULL, NULL,  NULL }
 };
 
-static const value_string messenger_opnum_vals[] = {
-       { 0, NULL }
-};
-
 void
 proto_register_dcerpc_messenger(void)
 {
@@ -59,7 +55,7 @@ proto_register_dcerpc_messenger(void)
 
                { &hf_messenger_opnum,
                  { "Operation", "messenger.opnum", FT_UINT16, BASE_DEC,
-                   VALS(messenger_opnum_vals), 0x0, "Operation", HFILL }}
+                   NULL, 0x0, "Operation", HFILL }}
 
         };
 
@@ -78,8 +74,16 @@ proto_register_dcerpc_messenger(void)
 void
 proto_reg_handoff_dcerpc_messenger(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_messenger, ett_dcerpc_messenger, &uuid_dcerpc_messenger,
                          ver_dcerpc_messenger, dcerpc_messenger_dissectors, hf_messenger_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_messenger_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_messenger_dissectors, array_length(dcerpc_messenger_dissectors));
 }
index 372001c9c8d3a4d8a4d26ac126e92fc37720ae3c..3562fb5802bc31ebc720e9b74a5dffb68f162ca1 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for dcerpc mgmt dissection
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc-mgmt.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
+ * $Id: packet-dcerpc-mgmt.c,v 1.6 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -36,6 +36,7 @@
 
 
 static int proto_mgmt = -1;
+static int hf_opnum = -1;
 
 static gint ett_mgmt = -1;
 
@@ -57,24 +58,31 @@ static dcerpc_sub_dissector mgmt_dissectors[] = {
 void
 proto_register_mgmt (void)
 {
-#if 0
        static hf_register_info hf[] = {
+               { &hf_opnum,
+                 { "Operation", "mgmt.opnum", FT_UINT16, BASE_DEC,
+                   NULL, 0x0, "", HFILL }},
        };
-#endif
 
        static gint *ett[] = {
                &ett_mgmt
        };
        proto_mgmt = proto_register_protocol ("DCE/RPC Remote Management", "MGMT", "mgmt");
-#if 0
        proto_register_field_array (proto_mgmt, hf, array_length (hf));
-#endif
        proto_register_subtree_array (ett, array_length (ett));
 }
 
 void
 proto_reg_handoff_mgmt (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
-       dcerpc_init_uuid (proto_mgmt, ett_mgmt, &uuid_mgmt, ver_mgmt, mgmt_dissectors, -1);
+       dcerpc_init_uuid (proto_mgmt, ett_mgmt, &uuid_mgmt, ver_mgmt, mgmt_dissectors, hf_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               mgmt_dissectors, array_length(mgmt_dissectors));
 }
index f983a12b65057327d73046eff4c6e9143d970b1f..102334c1995608265f97ba3894376e41a4bf3399 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *  2002 structure and command dissectors by Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-netlogon.c,v 1.82 2003/06/02 03:53:32 tpot Exp $
+ * $Id: packet-dcerpc-netlogon.c,v 1.83 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -6191,52 +6191,6 @@ static dcerpc_sub_dissector dcerpc_netlogon_dissectors[] = {
         {0, NULL, NULL,  NULL }
 };
 
-static const value_string netlogon_opnum_vals[] = {
-       { NETLOGON_UASLOGON, "UasLogon" },
-       { NETLOGON_UASLOGOFF, "UasLogoff" },
-       { NETLOGON_NETLOGONSAMLOGON, "SamLogon" },
-       { NETLOGON_NETLOGONSAMLOGOFF, "SamLogoff" },
-       { NETLOGON_NETSERVERREQCHALLENGE, "ServerReqChallenge" },
-       { NETLOGON_NETSERVERAUTHENTICATE, "ServerAuthenticate" },
-       { NETLOGON_NETSERVERPASSWORDSET, "ServerPasswdSet" },
-       { NETLOGON_NETSAMDELTAS, "DatabaseDeltas" },
-       { NETLOGON_DATABASESYNC, "DatabaseSync" },
-       { NETLOGON_ACCOUNTDELTAS, "AccountDeltas" },
-       { NETLOGON_ACCOUNTSYNC, "AccountSync" },
-       { NETLOGON_GETDCNAME, "GetDCName" },
-       { NETLOGON_NETLOGONCONTROL, "LogonControl" },
-       { NETLOGON_GETANYDCNAME, "GetAnyDCName" },
-       { NETLOGON_NETLOGONCONTROL2, "LogonControl2" },
-       { NETLOGON_NETSERVERAUTHENTICATE2, "ServerAuthenticate2" },
-       { NETLOGON_NETDATABASESYNC2, "DatabaseSync2" },
-       { NETLOGON_DATABASEREDO, "DatabaseRedo" },
-       { NETLOGON_FUNCTION_12, "Function_0x12" },
-       { NETLOGON_NETTRUSTEDDOMAINLIST, "TrustedDomainList" },
-       { NETLOGON_DSRGETDCNAME2, "DsrGetDCName2" },
-       { NETLOGON_FUNCTION_15, "Function_0x15" },
-       { NETLOGON_FUNCTION_16, "Function_0x16" },
-       { NETLOGON_FUNCTION_17, "Function_0x17" },
-       { NETLOGON_FUNCTION_18, "Function_0x18" },
-       { NETLOGON_FUNCTION_19, "Function_0x19" },
-       { NETLOGON_NETSERVERAUTHENTICATE3, "ServerAuthenticate3" },
-       { NETLOGON_DSRGETDCNAME, "DsrGetDCName" },
-       { NETLOGON_DSRGETSITENAME, "DsrGetSiteName" },
-       { NETLOGON_NETRLOGONGETDOMAININFO, "NetrLogonGetDomainInfo" },
-       { NETLOGON_FUNCTION_1E, "Function_0x1E" },
-       { NETLOGON_NETSERVERPASSWORDSET2, "ServerPasswordSet2" },
-       { NETLOGON_FUNCTION_20, "Function_0x20" },
-       { NETLOGON_FUNCTION_21, "Function_0x21" },
-       { NETLOGON_FUNCTION_22, "Function_0x22" },
-       { NETLOGON_FUNCTION_23, "Function_0x23" },
-       { NETLOGON_FUNCTION_24, "Function_0x24" },
-       { NETLOGON_FUNCTION_25, "Function_0x25" },
-       { NETLOGON_FUNCTION_26, "Function_0x26" },
-       { NETLOGON_LOGONSAMLOGONEX, "LogonSamLogonEx" },
-       { NETLOGON_DSENUMERATETRUSTEDDOMAINS, "DSEnumerateTrustedDomains" },
-       { NETLOGON_DSRDEREGISTERDNSHOSTRECORDS, "DsrDeregisterDNSHostRecords" },
-       { 0, NULL }
-};
-
 /* Secure channel types */
 
 static const value_string sec_chan_type_vals[] = {
@@ -6253,7 +6207,7 @@ proto_register_dcerpc_netlogon(void)
 static hf_register_info hf[] = {
        { &hf_netlogon_opnum,
          { "Operation", "netlogon.opnum", FT_UINT16, BASE_DEC,
-           VALS(netlogon_opnum_vals), 0x0, "Operation", HFILL }},
+           NULL, 0x0, "Operation", HFILL }},
 
        { &hf_netlogon_rc, {
                "Return code", "netlogon.rc", FT_UINT32, BASE_HEX,
@@ -7115,9 +7069,17 @@ static hf_register_info hf[] = {
 void
 proto_reg_handoff_dcerpc_netlogon(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_netlogon, ett_dcerpc_netlogon,
                          &uuid_dcerpc_netlogon, ver_dcerpc_netlogon,
                          dcerpc_netlogon_dissectors, hf_netlogon_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_netlogon_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_netlogon_dissectors, array_length(dcerpc_netlogon_dissectors));
 }
index f36609da10189419da5c6cbb926e2a13ec704858..e213c3309c3cb872af85a940c41344afdab2685d 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCOM OXID Resolver
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc-oxid.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
+ * $Id: packet-dcerpc-oxid.c,v 1.6 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,6 +35,8 @@
 
 static int proto_oxid = -1;
 
+static int hf_opnum = -1;
+
 static gint ett_oxid = -1;
 
 static e_uuid_t uuid_oxid = { 0x99fcfec4, 0x5260, 0x101b, { 0xbb, 0xcb, 0x00, 0xaa, 0x00, 0x21, 0x34, 0x7a } };
@@ -51,24 +53,31 @@ static dcerpc_sub_dissector oxid_dissectors[] = {
 void
 proto_register_oxid (void)
 {
-#if 0
        static hf_register_info hf[] = {
+               { &hf_opnum,
+                 { "Operation", "oxid.opnum", FT_UINT16, BASE_DEC,
+                   NULL, 0x0, "", HFILL }},
        };
-#endif
 
        static gint *ett[] = {
                &ett_oxid
        };
        proto_oxid = proto_register_protocol ("DCOM OXID Resolver", "OXID", "oxid");
-#if 0
        proto_register_field_array (proto_oxid, hf, array_length (hf));
-#endif
        proto_register_subtree_array (ett, array_length (ett));
 }
 
 void
 proto_reg_handoff_oxid (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
-       dcerpc_init_uuid (proto_oxid, ett_oxid, &uuid_oxid, ver_oxid, oxid_dissectors, -1);
+       dcerpc_init_uuid (proto_oxid, ett_oxid, &uuid_oxid, ver_oxid, oxid_dissectors, hf_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               oxid_dissectors, array_length(oxid_dissectors));
 }
index 448970d234e5286595081a400b29610f7eccbfdd..c59f63e136fee44bbb37abffb4401a404242bb33 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \PIPE\winreg packet disassembly
  * Copyright 2001-2003 Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-reg.c,v 1.19 2003/06/17 06:50:36 tpot Exp $
+ * $Id: packet-dcerpc-reg.c,v 1.20 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -669,37 +669,6 @@ static dcerpc_sub_dissector dcerpc_reg_dissectors[] = {
         { 0, NULL, NULL,  NULL }
 };
 
-static const value_string reg_opnum_vals[] = {
-        { REG_OPEN_HKCR, "OpenHKCR" },
-        { _REG_UNK_01, "Unknown01" },
-        { REG_OPEN_HKLM, "OpenHKLM" },
-        { _REG_UNK_03, "Unknown03" },
-        { REG_OPEN_HKU, "OpenHKU" },
-        { REG_CLOSE, "Close" },
-        { REG_CREATE_KEY, "CreateKey" },
-        { REG_DELETE_KEY, "DeleteKey" },
-        { REG_DELETE_VALUE, "DeleteValue" },
-        { REG_ENUM_KEY, "EnumKey" },
-        { REG_ENUM_VALUE, "EnumValue" },
-        { REG_FLUSH_KEY, "FlushKey" },
-        { REG_GET_KEY_SEC, "GetKeySecurity" },
-        { _REG_UNK_0D, "Unknown0d" },
-        { _REG_UNK_0E, "Unknown0e" },
-        { REG_OPEN_ENTRY, "OpenEntry" },
-        { REG_QUERY_KEY, "QueryKey" },
-        { REG_QUERY_VALUE, "QueryValue" },
-        { _REG_UNK_12, "Unknown12" },
-        { _REG_UNK_13, "Unknown13" },
-        { _REG_UNK_14, "Unknown14" },
-        { REG_SET_KEY_SEC, "SetKeySecurity" },
-        { REG_CREATE_VALUE, "CreateValue" },
-        { _REG_UNK_17, "Unknown17" },
-        { REG_SHUTDOWN, "Shutdown" },
-        { REG_ABORT_SHUTDOWN, "AbortShutdown" },
-        { _REG_UNK_1A, "Unknown1A" },
-       { 0, NULL }
-};
-
 void
 proto_register_dcerpc_reg(void)
 {
@@ -717,7 +686,7 @@ proto_register_dcerpc_reg(void)
 
                { &hf_reg_opnum,
                  { "Operation", "reg.opnum", FT_UINT16, BASE_DEC,
-                   VALS(reg_opnum_vals), 0x0, "Operation", HFILL }},
+                   NULL, 0x0, "Operation", HFILL }},
 
                { &hf_access_mask,
                  { "Access mask", "reg.access_mask", FT_UINT32, BASE_HEX,
@@ -828,8 +797,16 @@ proto_register_dcerpc_reg(void)
 void
 proto_reg_handoff_dcerpc_reg(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_reg, ett_dcerpc_reg, &uuid_dcerpc_reg,
                          ver_dcerpc_reg, dcerpc_reg_dissectors, hf_reg_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_reg_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_reg_dissectors, array_length(dcerpc_reg_dissectors));
 }
index b7ae1c94df4020573300836427f30c64ce3719cf..14b39030a344a3d1b1aecbb5436d120762b36848 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCOM Remote Activation
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc-remact.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
+ * $Id: packet-dcerpc-remact.c,v 1.7 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,6 +37,8 @@
 
 static int proto_remact = -1;
 
+static int hf_opnum = -1;
+
 static gint ett_remact = -1;
 
 
@@ -53,24 +55,31 @@ static dcerpc_sub_dissector remact_dissectors[] = {
 void
 proto_register_remact (void)
 {
-#if 0
        static hf_register_info hf[] = {
+               { &hf_opnum,
+                 { "Operation", "remact.opnum", FT_UINT16, BASE_DEC,
+                   NULL, 0x0, "", HFILL }},
        };
-#endif
 
        static gint *ett[] = {
                &ett_remact
        };
        proto_remact = proto_register_protocol ("DCOM Remote Activation", "REMACT", "remact");
-#if 0
        proto_register_field_array (proto_remact, hf, array_length (hf));
-#endif
        proto_register_subtree_array (ett, array_length (ett));
 }
 
 void
 proto_reg_handoff_remact (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
-       dcerpc_init_uuid (proto_remact, ett_remact, &uuid_remact, ver_remact, remact_dissectors, -1);
+       dcerpc_init_uuid (proto_remact, ett_remact, &uuid_remact, ver_remact, remact_dissectors, hf_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               remact_dissectors, array_length(remact_dissectors));
 }
index ecd4cbb9654592ad2c686ab759d3ce86e9dc4dbb..88f66b14beff38b61914a4919baac39fe719b957 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tgz  file/fsint/rep_proc.idl
  *
- * $Id: packet-dcerpc-rep_proc.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-rep_proc.c,v 1.3 2003/06/26 04:30:28 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -68,28 +68,13 @@ static dcerpc_sub_dissector rep_proc_dissectors[] = {
 };
 
 
-static const value_string rep_proc_opnum_vals[] = {
-    { 0, "CheckReplicationConfig" },
-    { 1, "AllCheckReplicationConfig" },
-    { 2, "KeepFilesAlive" },
-    { 3, "GetVolChangedFiles" },
-    { 4, "GetRepStatus" },
-    { 5, "GetRepServerStatus" },
-    { 6, "UpdateSelf" },
-    { 7, "Probe" },
-    { 8, "GetOneRepStatus" },
-    { 9, "GetServerInterfaces" },
-    { 0, NULL }
-};
-
-
 void
 proto_register_rep_proc (void)
 {
        static hf_register_info hf[] = {
          { &hf_rep_proc_opnum,
            { "Operation", "rep_proc.opnum", FT_UINT16, BASE_DEC,
-             VALS(rep_proc_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -103,6 +88,14 @@ proto_register_rep_proc (void)
 void
 proto_reg_handoff_rep_proc (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rep_proc, ett_rep_proc, &uuid_rep_proc, ver_rep_proc, rep_proc_dissectors, hf_rep_proc_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rep_proc_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rep_proc_dissectors, array_length(rep_proc_dissectors));
 }
index b4cd088e5acc396735e64a741c8490d135b4370e..4666055ec2406ef3481eb3fcefc9defe8be02a75 100644 (file)
@@ -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/roverride.idl
  *
- * $Id: packet-dcerpc-roverride.c,v 1.2 2002/11/08 19:42:39 guy Exp $
+ * $Id: packet-dcerpc-roverride.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -64,23 +64,12 @@ static dcerpc_sub_dissector roverride_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string roverride_opnum_vals[] = {
-    { 0, "roverride_get_login_info" },
-    { 1, "roverride_check_passwd" },
-    { 2, "roverride_is_passwd_overridden" },
-    { 3, "roverride_get_by_unix_num" },
-    { 4, "roverride_get_group_info" },
-    { 5, "roverride_check_group_passwd" },
-    { 6, "roverride_is_grp_pwd_overridden" },
-    { 0, NULL }
-};
-
 void
 proto_register_roverride (void)
 {
        static hf_register_info hf[] = {
       { &hf_roverride_opnum,
-         { "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, VALS(roverride_opnum_vals), 0x0, "Operation", HFILL }},
+         { "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
        };
 
        static gint *ett[] = {
@@ -94,6 +83,14 @@ proto_register_roverride (void)
 void
 proto_reg_handoff_roverride (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_roverride, ett_roverride, &uuid_roverride, ver_roverride, roverride_dissectors, hf_roverride_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_roverride_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               roverride_dissectors, array_length(roverride_dissectors));
 }
index 3405ae3a199918abe215d42232106b189555d666..6343120d0b03ce49e85a7b87044b7dfeee9736d7 100644 (file)
@@ -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/rpriv.idl
  *
- * $Id: packet-dcerpc-rpriv.c,v 1.3 2002/11/28 04:57:43 guy Exp $
+ * $Id: packet-dcerpc-rpriv.c,v 1.4 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -113,20 +113,12 @@ static dcerpc_sub_dissector rpriv_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string rpriv_opnum_vals[] = {
-    { 0, "rpriv_get_ptgt" },
-    { 1, "rpriv_become_delegate" },
-    { 2, "rpriv_become_impersonator" },
-    { 3, "rpriv_get_eptgt" },
-    { 0, NULL }
-};
-
 void
 proto_register_rpriv (void)
 {
        static hf_register_info hf[] = {
       { &hf_rpriv_opnum,
-         { "Operation", "rpriv.opnum", FT_UINT16, BASE_DEC, VALS(rpriv_opnum_vals), 0x0, "Operation", HFILL }},
+         { "Operation", "rpriv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
       { &hf_rpriv_get_eptgt_rqst_authn_svc,
          { "Authn_Svc", "rpriv.get_eptgt_rqst_authn_svc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
       { &hf_rpriv_get_eptgt_rqst_authz_svc,
@@ -157,6 +149,14 @@ proto_register_rpriv (void)
 void
 proto_reg_handoff_rpriv (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rpriv, ett_rpriv, &uuid_rpriv, ver_rpriv, rpriv_dissectors, hf_rpriv_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rpriv_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rpriv_dissectors, array_length(rpriv_dissectors));
 }
index f5dc1adf6f8d2e38ff68733a91455429b18347ed..4941038643144149c21f654857e4520746addbf3 100644 (file)
@@ -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_acct.idl
  *      
- * $Id: packet-dcerpc-rs_acct.c,v 1.3 2002/11/28 04:57:43 guy Exp $
+ * $Id: packet-dcerpc-rs_acct.c,v 1.4 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -130,22 +130,12 @@ static dcerpc_sub_dissector rs_acct_dissectors[] = {
         { 0, NULL, NULL, NULL }
 };
 
-static const value_string rs_acct_opnum_vals[] = {
-        { 0, "rs_acct_add" },
-        { 1, "rs_acct_delete" },
-        { 2, "rs_acct_rename" },
-        { 3, "rs_acct_lookup" },
-        { 4, "rs_acct_replace" },
-        { 5, "rs_acct_get_projlist" },
-        { 0, NULL }
-};
-
 void
 proto_register_rs_acct (void)
 {
        static hf_register_info hf[] = {
        { &hf_rs_acct_opnum,
-               { "Operation", "rs_acct.opnum", FT_UINT16, BASE_DEC, VALS(rs_acct_opnum_vals), 0x0, "Operation", HFILL }},
+               { "Operation", "rs_acct.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
        { &hf_rs_acct_lookup_rqst_var,
                { "Var", "rs_acct.lookup_rqst_var", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
        { &hf_rs_acct_lookup_rqst_key_size,
@@ -173,6 +163,15 @@ proto_register_rs_acct (void)
 void
 proto_reg_handoff_rs_acct (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rs_acct, ett_rs_acct, &uuid_rs_acct, ver_rs_acct, rs_acct_dissectors, hf_rs_acct_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rs_acct_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rs_acct_dissectors, array_length(rs_acct_dissectors));
+
 }
index f3ff4db1b1d4f2e8c073e2951128687faaf6aca4..c36687e9b64632877b66234baad167cb5b56604b 100644 (file)
@@ -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_attr.idl
  *      
- * $Id: packet-dcerpc-rs_attr.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-rs_attr.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -66,25 +66,12 @@ static dcerpc_sub_dissector rs_attr_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string rs_attr_opnum_vals[] = {
-    { 0, "rs_attr_cursor_init" },
-    { 1, "rs_attr_lookup_by_id" },
-    { 2, "rs_attr_lookup_no_expand" },
-    { 3, "rs_attr_lookup_by_name" },
-    { 4, "rs_attr_update" },
-    { 5, "rs_attr_test_and_update" },
-    { 6, "rs_attr_delete" },
-    { 7, "rs_attr_get_referral" },
-    { 8, "rs_attr_get_effective" },
-    { 0, NULL }
-};
-
 void
 proto_register_rs_attr (void)
 {
        static hf_register_info hf[] = {
        { &hf_rs_attr_opnum,
-               { "Operation", "rs_attr.opnum", FT_UINT16, BASE_DEC, VALS(rs_attr_opnum_vals), 0x0, "Operation", HFILL }},
+               { "Operation", "rs_attr.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
        };
 
        static gint *ett[] = {
@@ -98,6 +85,14 @@ proto_register_rs_attr (void)
 void
 proto_reg_handoff_rs_attr (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rs_attr, ett_rs_attr, &uuid_rs_attr, ver_rs_attr, rs_attr_dissectors, hf_rs_attr_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rs_attr_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rs_attr_dissectors, array_length(rs_attr_dissectors));
 }
index a8ae3e1f1fb71a26126a3241f69086aa7b592646..e7858ea9622451884262b6ddaebadbcf6306a0d4 100644 (file)
@@ -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_misc.idl
  *      
- * $Id: packet-dcerpc-rs_misc.c,v 1.3 2002/11/28 04:57:43 guy Exp $
+ * $Id: packet-dcerpc-rs_misc.c,v 1.4 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -97,20 +97,13 @@ static dcerpc_sub_dissector rs_misc_dissectors[] = {
        { 0, NULL, NULL, NULL }
 };
 
-static const value_string rs_misc_opnum_vals[] = {
-       { 0, "rs_login_get_info" },
-       { 1, "rs_wait_until_consistent" },
-       { 2, "rs_check_consistency" },
-       { 0, NULL },
-};
-
 void
 proto_register_rs_misc (void)
 {
        static hf_register_info hf[] = {
        { &hf_rs_misc_opnum,
                { "Operation", "rs_misc.opnum", FT_UINT16, BASE_DEC,
-               VALS(rs_misc_opnum_vals), 0x0, "Operation", HFILL }},
+               NULL, 0x0, "Operation", HFILL }},
        { &hf_rs_misc_login_get_info_rqst_var,
                { "Var", "rs_misc.login_get_info_rqst_var", FT_UINT32, BASE_DEC,
                NULL, 0x0, "", HFILL }},
@@ -133,6 +126,15 @@ proto_register_rs_misc (void)
 void
 proto_reg_handoff_rs_misc (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rs_misc, ett_rs_misc, &uuid_rs_misc, ver_rs_misc, rs_misc_dissectors, hf_rs_misc_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rs_misc_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rs_misc_dissectors, array_length(rs_misc_dissectors));
+
 }
index 7eaa081d8677f8512a49afdd57ea21f51e356701..9bb1bd51e61fbed4af7e9f84176a76bc20156b15 100644 (file)
@@ -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));
 }
index eb80be4bf8634acc8f2bf5cb9c24e3a4fd4db0ff..ba0d648ae0be6c6c26f4528e5c090a6acdc86e8a 100644 (file)
@@ -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_repadm.idl
  *
- * $Id: packet-dcerpc-rs_repadm.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-rs_repadm.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -72,29 +72,12 @@ static dcerpc_sub_dissector rs_repadm_dissectors[] = {
 };
 
 
-static const value_string rs_repadm_opnum_vals[] = {
-    { 0, "rs_rep_admin_stop" },
-    { 1, "rs_rep_admin_maint" },
-    { 2, "rs_rep_admin_mkey" },
-    { 3, "rs_rep_admin_info" },
-    { 4, "rs_rep_admin_info_full" },
-    { 5, "rs_rep_admin_destroy" },
-    { 6, "rs_rep_admin_init_replica" },
-    { 7, "rs_rep_admin_change_master" },
-    { 8, "rs_rep_admin_become_master" },
-    { 9, "rs_rep_admin_become_slave" },
-    { 10, "rs_rep_admin_set_sw_rev" },
-    { 11, "rs_rep_admin_get_sw_vers_info" },
-    { 0, NULL }
-};
-
-
 void
 proto_register_rs_repadm (void)
 {
        static hf_register_info hf[] = {
        { &hf_rs_repadm_opnum,
-               { "Operation", "rs_repadmin.opnum", FT_UINT16, BASE_DEC, VALS(rs_repadm_opnum_vals), 0x0, "Operation", HFILL }}
+               { "Operation", "rs_repadmin.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -108,6 +91,14 @@ proto_register_rs_repadm (void)
 void
 proto_reg_handoff_rs_repadm (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rs_repadm, ett_rs_repadm, &uuid_rs_repadm, ver_rs_repadm, rs_repadm_dissectors, hf_rs_repadm_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rs_repadm_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rs_repadm_dissectors, array_length(rs_repadm_dissectors));
 }
index 565240d3a9ff380e0b6f2c5f64fce2a9f3985977..1970e5e1e43fab5f6a25a9c1baf790b9f43947d7 100644 (file)
@@ -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_repadm.idl
  *      
- * $Id: packet-dcerpc-rs_replist.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-rs_replist.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -67,26 +67,12 @@ static dcerpc_sub_dissector rs_replist_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string rs_replist_opnum_vals[] = {
-    { 0, "rs_replist_add_replica" },
-    { 1, "rs_replist_replace_replica" },
-    { 2, "rs_replist_delete_replica" },
-    { 3, "rs_replist_read" },
-    { 4, "rs_replist_read_full" },
-    { 5, "rs_replist_add_replica" },
-    { 6, "rs_replist_replace_replica" },
-    { 7, "rs_replist_delete_replica" },
-    { 8, "rs_replist_read" },
-    { 9, "rs_replist_read_full" },
-    { 0, NULL }
-};
-
 void
 proto_register_rs_replist (void)
 {
        static hf_register_info hf[] = {
        { &hf_rs_replist_opnum,
-               { "Operation", "rs_replist.opnum", FT_UINT16, BASE_DEC, VALS(rs_replist_opnum_vals), 0x0, "Operation", HFILL }},
+               { "Operation", "rs_replist.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
        };
 
        static gint *ett[] = {
@@ -101,6 +87,14 @@ proto_register_rs_replist (void)
 void
 proto_reg_handoff_rs_replist (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rs_replist, ett_rs_replist, &uuid_rs_replist, ver_rs_replist, rs_replist_dissectors, hf_rs_replist_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rs_replist_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rs_replist_dissectors, array_length(rs_replist_dissectors));
 }
index 537bd61fae99891686ba7cd63b7787d7600074e8..f49d3ec002ba49476b8527470a7dec53f86a9220 100644 (file)
@@ -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_unix.idl
  *
- * $Id: packet-dcerpc-rs_unix.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-rs_unix.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -57,18 +57,13 @@ static dcerpc_sub_dissector rs_unix_dissectors[] = {
     { 0, NULL, NULL, NULL },
 };
 
-static const value_string rs_unix_opnum_vals[] = {
-    { 0, "rs_unix_getpwents" },
-    { 0, NULL },
-};
-
 void
 proto_register_rs_unix (void)
 {
        static hf_register_info hf[] = {
          { &hf_rs_unix_opnum,
            { "Operation", "rs_unix.opnum", FT_UINT16, BASE_DEC,
-             VALS(rs_unix_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -82,6 +77,14 @@ proto_register_rs_unix (void)
 void
 proto_reg_handoff_rs_unix (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rs_unix, ett_rs_unix, &uuid_rs_unix, ver_rs_unix, rs_unix_dissectors, hf_rs_unix_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rs_unix_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rs_unix_dissectors, array_length(rs_unix_dissectors));
 }
index 774fc1b2a5c4709871c6ebfd9a64a808cd566d39..223bfbdd50eca34d418121f1390901f54b846907 100644 (file)
@@ -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/rsec_login.idl
  *      
- * $Id: packet-dcerpc-rsec_login.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-rsec_login.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -57,18 +57,12 @@ static dcerpc_sub_dissector rsec_login_dissectors[] = {
     { 0, NULL, NULL, NULL }
 };
 
-static const value_string rsec_login_opnum_vals[] = {
-    { 0, "rsec_login_get_trusted_preauth" },
-    { 0, NULL }
-};
-
-
 void
 proto_register_rsec_login (void)
 {
        static hf_register_info hf[] = {
        { &hf_rsec_login_opnum,
-               { "Operation", "rsec_login.opnum", FT_UINT16, BASE_DEC, VALS(rsec_login_opnum_vals), 0x0, "Operation", HFILL }}
+               { "Operation", "rsec_login.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -82,6 +76,14 @@ proto_register_rsec_login (void)
 void
 proto_reg_handoff_rsec_login (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_rsec_login, ett_rsec_login, &uuid_rsec_login, ver_rsec_login, rsec_login_dissectors, hf_rsec_login_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_rsec_login_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               rsec_login_dissectors, array_length(rsec_login_dissectors));
 }
index 2244f966c1f30be2b475fc2e0845832622a9ca22..9e8236f5692630c30efb5c6debb68ade070c2542 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *   2002 Added all command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-samr.c,v 1.95 2003/06/05 04:22:03 guy Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.96 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -5084,82 +5084,12 @@ static dcerpc_sub_dissector dcerpc_samr_dissectors[] = {
         {0, NULL, NULL,  NULL }
 };
 
-static const value_string samr_opnum_vals[] = {
-        { SAMR_CONNECT, "SamrConnect" },
-        { SAMR_CLOSE_HND, "Close" },
-        { SAMR_SET_SEC_OBJECT, "SetSecObject" },
-        { SAMR_QUERY_SEC_OBJECT, "QuerySecObject" },
-        { SAMR_SHUTDOWN_SAM_SERVER, "ShutdownSamServer" },
-        { SAMR_LOOKUP_DOMAIN, "LookupDomain" },
-        { SAMR_ENUM_DOMAINS, "EnumDomains" },
-        { SAMR_OPEN_DOMAIN, "OpenDomain" },
-       { SAMR_QUERY_DOMAIN_INFO, "QueryDomainInfo" },
-        { SAMR_SET_DOMAIN_INFO, "SetDomainInfo" },
-        { SAMR_CREATE_DOM_GROUP, "CreateGroup" },
-        { SAMR_ENUM_DOM_GROUPS, "EnumDomainGroups" },
-       { SAMR_CREATE_USER_IN_DOMAIN, "CreateUser" },
-        { SAMR_ENUM_DOM_USERS, "EnumDomainUsers" },
-        { SAMR_CREATE_DOM_ALIAS, "CreateAlias" },
-        { SAMR_ENUM_DOM_ALIASES, "EnumAliases" },
-        { SAMR_GET_ALIAS_MEMBERSHIP, "GetAliasMem" },
-        { SAMR_LOOKUP_NAMES, "LookupNames" },
-        { SAMR_LOOKUP_RIDS, "LookupRIDs" },
-        { SAMR_OPEN_GROUP, "OpenGroup" },
-        { SAMR_QUERY_GROUPINFO, "QueryGroupInfo" },
-        { SAMR_SET_GROUPINFO, "SetGroupInfo" },
-        { SAMR_ADD_GROUPMEM, "AddGroupMem" },
-        { SAMR_DELETE_DOM_GROUP, "DeleteDomainGroup" },
-        { SAMR_DEL_GROUPMEM, "RemoveGroupMem" },
-        { SAMR_QUERY_GROUPMEM, "QueryGroupMem" },
-        { SAMR_SET_MEMBER_ATTRIBUTES_OF_GROUP, "SetMemberAttrGroup" },
-        { SAMR_OPEN_ALIAS, "OpenAlias" },
-        { SAMR_QUERY_ALIASINFO, "QueryAliasInfo" },
-        { SAMR_SET_ALIASINFO, "SetAliasInfo" },
-        { SAMR_DELETE_DOM_ALIAS, "DeleteAlias" },
-        { SAMR_ADD_ALIASMEM, "AddAliasMem" },
-        { SAMR_DEL_ALIASMEM, "RemoveAliasMem" },
-        { SAMR_GET_MEMBERS_IN_ALIAS, "GetAliasMem" },
-        { SAMR_OPEN_USER, "OpenUser" },
-        { SAMR_DELETE_DOM_USER, "DeleteUser" },
-        { SAMR_QUERY_USERINFO, "QueryUserInfo" },
-        { SAMR_SET_USERINFO2, "SetUserInfo2" },
-       { SAMR_CHANGE_PASSWORD_USER, "ChangePassword" },
-        { SAMR_GET_GROUPS_FOR_USER, "GetGroups" },
-        { SAMR_QUERY_DISPINFO, "QueryDispinfo" },
-        { SAMR_GET_DISPLAY_ENUMERATION_INDEX, "GetDispEnumNDX" },
-        { SAMR_TEST_PRIVATE_FUNCTIONS_DOMAIN, "TestPrivateFnsDomain" },
-        { SAMR_TEST_PRIVATE_FUNCTIONS_USER, "TestPrivateFnsUser" },
-        { SAMR_GET_USRDOM_PWINFO, "GetUserDomPwInfo" },
-        { SAMR_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN, "RemoveMemberForeignDomain" },
-        { SAMR_QUERY_INFORMATION_DOMAIN2, "QueryDomInfo2" },
-        { SAMR_UNKNOWN_2f, "Unknown 0x2f" },
-        { SAMR_QUERY_DISPINFO2, "QueryDispinfo2" },
-        { SAMR_GET_DISPLAY_ENUMERATION_INDEX2, "GetDispEnumNDX2" },
-        { SAMR_CREATE_USER2_IN_DOMAIN, "CreateUser2" },
-        { SAMR_QUERY_DISPINFO3, "QueryDispinfo3" },
-        { SAMR_ADD_MULTIPLE_MEMBERS_TO_ALIAS, "AddAliasMemMultiple" },
-        { SAMR_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS, "RemoveAliasMemMultiple" },
-        { SAMR_OEM_CHANGE_PASSWORD_USER2, "OEMChangePassword2" },
-        { SAMR_UNICODE_CHANGE_PASSWORD_USER2, "UnicodeChangePassword2" },
-        { SAMR_GET_DOM_PWINFO, "GetDomainPasswordInfo" },
-       { SAMR_CONNECT2, "Connect2" },
-        { SAMR_SET_USERINFO, "SetUserInfo" },
-        { SAMR_UNKNOWN_3B, "Unknown 0x3b" },
-        { SAMR_UNKNOWN_3C, "Unknown 0x3c" },
-       { SAMR_CONNECT3, "Connect3" },
-       { SAMR_CONNECT4, "Connect4" },
-       { 0, NULL }
-};
-
 void
 proto_register_dcerpc_samr(void)
 {
         static hf_register_info hf[] = {
-
                { &hf_samr_opnum,
-                 { "Operation", "samr.opnum", FT_UINT16, BASE_DEC,
-                   VALS(samr_opnum_vals), 0x0, "Operation", HFILL }},
-
+                 { "Operation", "samr.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
                 { &hf_samr_hnd,
                   { "Context Handle", "samr.hnd", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL }},
                 { &hf_samr_group,
@@ -5747,8 +5677,16 @@ proto_register_dcerpc_samr(void)
 void
 proto_reg_handoff_dcerpc_samr(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_samr, ett_dcerpc_samr, &uuid_dcerpc_samr,
                          ver_dcerpc_samr, dcerpc_samr_dissectors, hf_samr_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_samr_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_samr_dissectors, array_length(dcerpc_samr_dissectors));
 }
index b6fb280621084d6e746bb6e17604a14df16bfb84..087a880ab38f9bc3fb9b75d6c3d69251460b7a45 100644 (file)
@@ -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/rsecidmap.idl
  *      
- * $Id: packet-dcerpc-secidmap.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-secidmap.c,v 1.3 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -61,24 +61,13 @@ static dcerpc_sub_dissector secidmap_dissectors[] = {
         { 0, NULL, NULL, NULL },
 };
 
-
-static const value_string secidmap_opnum_vals[] = {
-       { 0, "ParseNameRedbox" },
-       { 1, "GenNameBluebox" },
-       { 2, "AvoidCnBug" },
-       { 3, "ParseNameCache" },
-       { 4, "GenNameCache" },
-        { 0, NULL }
-};
-
-
 void
 proto_register_secidmap (void)
 {
        static hf_register_info hf[] = {
          { &hf_secidmap_opnum,
            { "Operation", "secidmap.opnum", FT_UINT16, BASE_DEC,
-             VALS(secidmap_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -92,7 +81,15 @@ proto_register_secidmap (void)
 void
 proto_reg_handoff_secidmap (void)
 {
+       header_field_info *hf_info;
+
         /* Register the protocol as dcerpc */
         dcerpc_init_uuid (proto_secidmap, ett_secidmap, &uuid_secidmap, ver_secidmap, secidmap_dissectors, hf_secidmap_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_secidmap_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               secidmap_dissectors, array_length(secidmap_dissectors));
 }
                           
index 22f4b67dc49f65fc3c2eb618e9ef04101207567e..6e18e1c8222e2c5c6499928be060eb9fa63f37e6 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for SMB \PIPE\spoolss packet disassembly
  * Copyright 2001-2003, Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-spoolss.c,v 1.101 2003/06/17 05:29:45 tpot Exp $
+ * $Id: packet-dcerpc-spoolss.c,v 1.102 2003/06/26 04:30:29 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -6673,93 +6673,6 @@ static dcerpc_sub_dissector dcerpc_spoolss_dissectors[] = {
 static int proto_dcerpc_spoolss = -1;
 static gint ett_dcerpc_spoolss = -1;
 
-static const value_string spoolss_opnum_vals[] = {
-        { SPOOLSS_ENUMPRINTERS, "EnumPrinters" },
-       { SPOOLSS_OPENPRINTER, "OpenPrinter" },
-        { SPOOLSS_SETJOB, "SetJob" },
-        { SPOOLSS_GETJOB, "GetJob" },
-        { SPOOLSS_ENUMJOBS, "EnumJobs" },
-        { SPOOLSS_ADDPRINTER, "AddPrinter" },
-        { SPOOLSS_DELETEPRINTER, "DeletePrinter" },
-        { SPOOLSS_SETPRINTER, "SetPrinter" },
-        { SPOOLSS_GETPRINTER, "GetPrinter" },
-        { SPOOLSS_ADDPRINTERDRIVER, "AddPrinterDriver" },
-        { SPOOLSS_ENUMPRINTERDRIVERS, "EnumPrinterDrivers" },
-       { SPOOLSS_GETPRINTERDRIVER, "GetPrinterDriver" },
-        { SPOOLSS_GETPRINTERDRIVERDIRECTORY, "GetPrinterDriverDirectory" },
-        { SPOOLSS_DELETEPRINTERDRIVER, "DeletePrinterDriver" },
-        { SPOOLSS_ADDPRINTPROCESSOR, "AddPrintProcessor" },
-        { SPOOLSS_ENUMPRINTPROCESSORS, "EnumPrintProcessor" },
-       { SPOOLSS_GETPRINTPROCESSORDIRECTORY, "GetPrintProcessorDirectory" },
-        { SPOOLSS_STARTDOCPRINTER, "StartDocPrinter" },
-        { SPOOLSS_STARTPAGEPRINTER, "StartPagePrinter" },
-        { SPOOLSS_WRITEPRINTER, "WritePrinter" },
-        { SPOOLSS_ENDPAGEPRINTER, "EndPagePrinter" },
-        { SPOOLSS_ABORTPRINTER, "AbortPrinter" },
-       { SPOOLSS_READPRINTER, "ReadPrinter" },
-        { SPOOLSS_ENDDOCPRINTER, "EndDocPrinter" },
-        { SPOOLSS_ADDJOB, "AddJob" },
-        { SPOOLSS_SCHEDULEJOB, "ScheduleJob" },
-        { SPOOLSS_GETPRINTERDATA, "GetPrinterData" },
-        { SPOOLSS_SETPRINTERDATA, "SetPrinterData" },
-       { SPOOLSS_WAITFORPRINTERCHANGE, "WaitForPrinterChange" },
-        { SPOOLSS_CLOSEPRINTER, "ClosePrinter" },
-        { SPOOLSS_ADDFORM, "AddForm" },
-        { SPOOLSS_DELETEFORM, "DeleteForm" },
-        { SPOOLSS_GETFORM, "GetForm" },
-        { SPOOLSS_SETFORM, "SetForm" },
-        { SPOOLSS_ENUMFORMS, "EnumForms" },
-        { SPOOLSS_ENUMPORTS, "EnumPorts" },
-        { SPOOLSS_ENUMMONITORS, "EnumMonitors" },
-       { SPOOLSS_ADDPORT, "AddPort" },
-       { SPOOLSS_CONFIGUREPORT, "ConfigurePort" },
-       { SPOOLSS_DELETEPORT, "DeletePort" },
-       { SPOOLSS_CREATEPRINTERIC, "CreatePrinterIC" },
-       { SPOOLSS_PLAYGDISCRIPTONPRINTERIC, "PlayDiscriptOnPrinterIC" },
-       { SPOOLSS_DELETEPRINTERIC, "DeletePrinterIC" },
-       { SPOOLSS_ADDPRINTERCONNECTION, "AddPrinterConnection" },
-       { SPOOLSS_DELETEPRINTERCONNECTION, "DeletePrinterConnection" },
-       { SPOOLSS_PRINTERMESSAGEBOX, "PrinterMessageBox" },
-       { SPOOLSS_ADDMONITOR, "AddMonitor" },
-       { SPOOLSS_DELETEMONITOR, "DeleteMonitor" },
-       { SPOOLSS_DELETEPRINTPROCESSOR, "DeletePrintProcessor" },
-       { SPOOLSS_ADDPRINTPROVIDER, "AddPrintProvider" },
-       { SPOOLSS_DELETEPRINTPROVIDER, "DeletePrintProvider" },
-        { SPOOLSS_ENUMPRINTPROCDATATYPES, "EnumPrintProcDataTypes" },
-       { SPOOLSS_RESETPRINTER, "ResetPrinter" },
-        { SPOOLSS_GETPRINTERDRIVER2, "GetPrinterDriver2" },
-       { SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, 
-         "FindNextPrinterChangeNotification" },
-       { SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, 
-         "FindNextPrinterChangeNotification" },
-        { SPOOLSS_FCPN, "FCPN" },
-       { SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD, 
-         "RouterFindFirstPrinterNotificationOld" },
-        { SPOOLSS_REPLYOPENPRINTER, "ReplyOpenPrinter" },
-       { SPOOLSS_ROUTERREPLYPRINTER, "RouterReplyPrinter" },
-        { SPOOLSS_REPLYCLOSEPRINTER, "ReplyClosePrinter" },
-       { SPOOLSS_ADDPORTEX, "AddPortEx" },
-       { SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION, 
-         "RemoteFindFirstPrinterChangeNotification" },
-       { SPOOLSS_SPOOLERINIT, "SpoolerInit" },
-       { SPOOLSS_RESETPRINTEREX, "ResetPrinterEx" },
-        { SPOOLSS_RFFPCNEX, "RFFPCNEX" },
-        { SPOOLSS_RRPCN, "RRPCN" },
-        { SPOOLSS_RFNPCNEX, "RFNPCNEX" },
-        { SPOOLSS_OPENPRINTEREX, "OpenPrinterEx" },
-        { SPOOLSS_ADDPRINTEREX, "AddPrinterEx" },
-        { SPOOLSS_ENUMPRINTERDATA, "EnumPrinterData" },
-        { SPOOLSS_DELETEPRINTERDATA, "DeletePrinterData" },
-        { SPOOLSS_GETPRINTERDATAEX, "GetPrinterDataEx" },
-        { SPOOLSS_SETPRINTERDATAEX, "SetPrinterDataEx" },
-       { SPOOLSS_ENUMPRINTERDATAEX, "EnumPrinterDataEx" },
-       { SPOOLSS_ENUMPRINTERKEY, "EnumPrinterKey" },
-       { SPOOLSS_DELETEPRINTERDATAEX, "DeletePrinterDataEx" },
-       { SPOOLSS_DELETEPRINTERDRIVEREX, "DeletePrinterDriverEx" },
-       { SPOOLSS_ADDPRINTERDRIVEREX, "AddPrinterDriverEx" },
-       { 0, NULL }
-};
-
 void
 proto_register_dcerpc_spoolss(void)
 {
@@ -6875,7 +6788,7 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_opnum,
                  { "Operation", "spoolss.opnum", FT_UINT16, BASE_DEC,
-                   VALS(spoolss_opnum_vals), 0x0, "Operation", HFILL }},
+                   NULL, 0x0, "Operation", HFILL }},
 
                { &hf_hnd,
                  { "Context handle", "spoolss.hnd", FT_BYTES, BASE_NONE,
@@ -8290,9 +8203,17 @@ static guint16 ver_dcerpc_spoolss = 1;
 void
 proto_reg_handoff_dcerpc_spoolss(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_spoolss, ett_dcerpc_spoolss,
                          &uuid_dcerpc_spoolss, ver_dcerpc_spoolss,
                          dcerpc_spoolss_dissectors, hf_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_spoolss_dissectors, array_length(dcerpc_spoolss_dissectors));
 }
index 16116db4ac51c462f674d0ea467adfcba5d40046..7a130918a290260448555b85c4534a67d1c169c5 100644 (file)
@@ -9,7 +9,7 @@
  * 2002, some share information levels implemented based on samba
  * sources.
  *
- * $Id: packet-dcerpc-srvsvc.c,v 1.57 2003/06/05 04:22:04 guy Exp $
+ * $Id: packet-dcerpc-srvsvc.c,v 1.58 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -6789,60 +6789,13 @@ static dcerpc_sub_dissector dcerpc_srvsvc_dissectors[] = {
        {0, NULL, NULL, NULL}
 };
 
-static const value_string srvsvc_opnum_vals[] = {
-       {SRV_NETRCHARDEVENUM,           "NetrCharDevEnum" },
-       {SRV_NETRCHARDEVGETINFO,        "NetrCharDevGetInfo" },
-       {SRV_NETRCHARDEVCONTROL,        "NetrCharDevControl" },
-       {SRV_NETRCHARDEVQENUM,          "NetrCharDevQEnum" },
-       {SRV_NETRCHARDEVQGETINFO,       "NetrCharDevQGetInfo" },
-       {SRV_NETRCHARDEVQSETINFO,       "NetrCharDevQSetInfo" },
-       {SRV_NETRCHARDEVQPURGE,         "NetrCharDevQPurge" },
-       {SRV_NETRCHARDEVQPURGESELF,     "NetrCharDevQPurgeSelf" },
-       {SRV_NETRCONNECTIONENUM,        "NetrConnectionEnum" },
-       {SRV_NETRFILEENUM,              "NetrFileEnum" },
-       {SRV_NETRFILEGETINFO,           "NetrFileGetInfo" },
-       {SRV_NETRFILECLOSE,             "NetrFileClose" },
-       {SRV_NETRSESSIONENUM,           "NetrSessionEnum" },
-       {SRV_NETRSESSIONDEL,            "NetrSessionDel" },
-       {SRV_NETRSHAREADD,              "NetrShareAdd" },
-       {SRV_NETRSHAREENUM,             "NetrShareEnum" },
-       {SRV_NETRSHAREGETINFO,          "NetrShareGetInfo" },
-       {SRV_NETRSHARESETINFO,          "NetrShareSetInfo" },
-       {SRV_NETRSHAREDEL,              "NetrShareDel" },
-       {SRV_NETRSHAREDELSTICKY,        "NetrShareDelSticky" },
-       {SRV_NETRSHARECHECK,            "NetrShareCheck" },
-       {SRV_NETRSERVERGETINFO,         "NetrServerGetInfo" },
-       {SRV_NETRSERVERSETINFO,         "NetrServerSetInfo" },
-       {SRV_NETRSERVERDISKENUM,        "NetrServerDiskEnum" },
-       {SRV_NETRSERVERSTATISTICSGET,   "NetrServerStatisticsGet" },
-       {SRV_NETRSERVERTRANSPORTADD,    "NetrServerTransportAdd" },
-       {SRV_NETRSERVERTRANSPORTENUM,   "NetrServerTransportEnum" },
-       {SRV_NETRSERVERTRANSPORTDEL,    "NetrServerTransportDel" },
-       {SRV_NETRREMOTETOD,             "NetrRemoteTOD" },
-       {SRV_NETRSERVERSETSERVICEBITS,  "NetrServerSetServiceBits" },
-       {SRV_NETRPRPATHTYPE,            "NetrPathType" },
-       {SRV_NETRPRPATHCANONICALIZE,    "NetrpPathCanonicalize" },
-       {SRV_NETRPRPATHCOMPARE,         "NetrpPathCompare" },
-       {SRV_NETRPRNAMEVALIDATE,        "NetrpNameValidate" },
-       {SRV_NETRPRNAMECANONICALIZE,    "NetrpNameCanonicalize" },
-       {SRV_NETRPRNAMECOMPARE,         "NetrpNameCompare" },
-       {SRV_NETRSHAREENUMSTICKY,       "NetrShareEnumSticky" },
-       {SRV_NETRSHAREDELSTART,         "NetrShareDelStart" },
-       {SRV_NETRSHAREDELCOMMIT,        "NetrShareDelCommit" },
-       {SRV_NETRPGETFILESECURITY,      "NetrpGetFileSecurity" },
-       {SRV_NETRPSETFILESECURITY,      "NetrpSetFileSecurity" },
-       {SRV_NETRSERVERTRANSPORTADDEX,  "NetrServerTransportAddEx" },
-       {SRV_NETRSERVERSETSERVICEBITS2, "NetrServerSetServiceBits2" },
-       {0, NULL }
-};
-
 void
 proto_register_dcerpc_srvsvc(void)
 {
         static hf_register_info hf[] = {
          { &hf_srvsvc_opnum,
            { "Operation", "srvsvc.opnum", FT_UINT16, BASE_DEC,
-             VALS(srvsvc_opnum_vals), 0x0, "Operation", HFILL }},
+             NULL, 0x0, "Operation", HFILL }},
          { &hf_srvsvc_server,
            { "Server", "srvsvc.server", FT_STRING, BASE_NONE,
            NULL, 0x0, "Server Name", HFILL}},
@@ -7407,9 +7360,17 @@ proto_register_dcerpc_srvsvc(void)
 void
 proto_reg_handoff_dcerpc_srvsvc(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_srvsvc, ett_dcerpc_srvsvc,
                          &uuid_dcerpc_srvsvc, ver_dcerpc_srvsvc,
                          dcerpc_srvsvc_dissectors, hf_srvsvc_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_srvsvc_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_srvsvc_dissectors, array_length(dcerpc_srvsvc_dissectors));
 }
index 8db1d888b5ee90b64b7ff9742cfbc254c5082976..048ed5cfce94420a66da10cdc106445689fa9132 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2003, Tim Potter <tpot@samba.org>
  * Copyright 2003, Ronnie Sahlberg,  added function dissectors
  *
- * $Id: packet-dcerpc-svcctl.c,v 1.9 2003/06/05 04:22:04 guy Exp $
+ * $Id: packet-dcerpc-svcctl.c,v 1.10 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -476,35 +476,13 @@ static dcerpc_sub_dissector dcerpc_svcctl_dissectors[] = {
        {0, NULL, NULL, NULL}
 };
 
-static const value_string svcctl_opnum_vals[] = {
-       { SVC_CLOSE_SERVICE_HANDLE, "CloseServiceHandle" },
-       { SVC_STOP_SERVICE, "StopService" },
-       { SVC_DELETE, "DeleteService" },
-       { SVC_LOCK_SERVICE_DATABASE, "LockServiceDatabase" },
-       { SVC_GET_SVC_SEC, "QueryServiceObjectSecurity" },
-       { SVC_UNLOCK_SERVICE_DATABASE, "UnockServiceDatabase" },
-       { SVC_CHANGE_SVC_CONFIG, "Change config" },
-       { SVC_ENUM_SVCS_STATUS, "Enum status" },
-       { SVC_OPEN_SC_MAN, "Open SC Manager" },
-       { SVC_OPEN_SERVICE, "Open service" },
-       { SVC_QUERY_SVC_CONFIG, "Query config" },
-       { SVC_START_SERVICE, "Start" },
-       { SVC_QUERY_DISP_NAME, "Query display name" },
-       { SVC_ENUM_SERVICES_STATUS, "EnumServicesStatus" },
-       { SVC_OPEN_SC_MANAGER, "OpenSCManager" },
-       { SVC_OPEN_SERVICE_A, "Open Service A" },
-       { SVC_QUERY_SERVICE_LOCK_STATUS, "QueryServiceLockStatus" },
-       { 0, NULL }
-};
-
-
 void
 proto_register_dcerpc_svcctl(void)
 {
         static hf_register_info hf[] = {
          { &hf_svcctl_opnum,
            { "Operation", "svcctl.opnum", FT_UINT16, BASE_DEC,
-             VALS(svcctl_opnum_vals), 0x0, "Operation", HFILL }},
+             NULL, 0x0, "Operation", HFILL }},
          { &hf_svcctl_machinename,
            { "MachineName", "svcctl.machinename", FT_STRING, BASE_NONE,
              NULL, 0x0, "Name of the host we want to open the database on", HFILL }},
@@ -582,9 +560,17 @@ proto_register_dcerpc_svcctl(void)
 void
 proto_reg_handoff_dcerpc_svcctl(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_svcctl, ett_dcerpc_svcctl,
                          &uuid_dcerpc_svcctl, ver_dcerpc_svcctl,
                          dcerpc_svcctl_dissectors, hf_svcctl_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_svcctl_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_svcctl_dissectors, array_length(dcerpc_svcctl_dissectors));
 }
index 6256fcea8780bbfee9c2f775559f62d1cf5df0fd..59a4036887ba107e229fcf739daefc19d453e346 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC TAPI packet disassembly
  * Copyright 2002, Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-tapi.c,v 1.5 2003/01/30 08:19:39 guy Exp $
+ * $Id: packet-dcerpc-tapi.c,v 1.6 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -38,6 +38,7 @@
 #include "smb.h"
 
 static int proto_dcerpc_tapi = -1;
+static int hf_tapi_opnum = -1;
 static int hf_tapi_rc = -1;
 static int hf_tapi_hnd = -1;
 static int hf_tapi_unknown_long = -1;
@@ -203,6 +204,9 @@ void
 proto_register_dcerpc_tapi(void)
 {
 static hf_register_info hf[] = {
+       { &hf_tapi_opnum, { 
+               "Operation", "tapi.opnum", FT_UINT16, BASE_DEC,
+               NULL, 0x0, "", HFILL }},
        { &hf_tapi_rc, {
                "Return code", "tapi.rc", FT_UINT32, BASE_HEX,
                VALS(NT_errors), 0x0, "TAPI return code", HFILL }},
@@ -236,9 +240,17 @@ static hf_register_info hf[] = {
 void
 proto_reg_handoff_dcerpc_tapi(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_tapi, ett_dcerpc_tapi,
                          &uuid_dcerpc_tapi, ver_dcerpc_tapi,
-                         dcerpc_tapi_dissectors, -1);
+                         dcerpc_tapi_dissectors, hf_tapi_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_tapi_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_tapi_dissectors, array_length(dcerpc_tapi_dissectors));
 }
index acbae12e6d0e5477baffb2f106382c04c2cb46d4..6ff6ad433473808f0bcba7f24ce5d45c87a1a8a6 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/fsint/tkn4int.idl
  *     
- * $Id: packet-dcerpc-tkn4int.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-tkn4int.c,v 1.3 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -67,28 +67,13 @@ static dcerpc_sub_dissector tkn4int_dissectors[] = {
 
 };
 
-
-static const value_string tkn4int_opnum_vals[] = {
-    { 0, "Probe" },
-    { 1, "InitTokenState" },
-    { 2, "TokenRevoke" },
-    { 3, "GetCellName" },
-    { 4, "GetLock" },
-    { 5, "GetCE" },
-    { 6, "GetServerInterfaces" },
-    { 7, "SetParams" },
-    { 8, "AsyncGrant" },
-    { 0, NULL }
-
-};
-
 void
 proto_register_tkn4int (void)
 {
        static hf_register_info hf[] = {
          { &hf_tkn4int_opnum,
            { "Operation", "tkn4int.opnum", FT_UINT16, BASE_DEC,
-             VALS(tkn4int_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -102,6 +87,14 @@ proto_register_tkn4int (void)
 void
 proto_reg_handoff_tkn4int (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_tkn4int, ett_tkn4int, &uuid_tkn4int, ver_tkn4int, tkn4int_dissectors, hf_tkn4int_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_tkn4int_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               tkn4int_dissectors, array_length(tkn4int_dissectors));
 }
index 6662e5255173d569824ac01d717e0c9babd3fdeb..aebe3b8e40292420a451cfdac79e9ddf08138fee 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/ncsubik/ubikdisk_proc.idl
  *
- * $Id: packet-dcerpc-ubikdisk.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-ubikdisk.c,v 1.3 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -70,31 +70,13 @@ static dcerpc_sub_dissector ubikdisk_dissectors[] = {
         { 0, NULL, NULL, NULL }
 };
 
-static const value_string ubikdisk_opnum_vals[] = {
-       {  0, "Begin" },
-       {  1, "Commit" },
-       {  2, "Lock" },
-       {  3, "Write" },
-       {  4, "GetVersion" },
-       {  5, "GetFile" },
-       {  6, "SendFile" },
-       {  7, "Abort" },
-       {  8, "ReleaseLocks" },
-       {  9, "Truncate" },
-       { 10, "Probe" },
-       { 11, "GetServerInterfaces" },
-       { 12, "BulkUpdate" },
-        { 0, NULL }
-};
-
-
 void
 proto_register_ubikdisk (void)
 {
        static hf_register_info hf[] = {
          { &hf_ubikdisk_opnum,
            { "Operation", "ubikdisk.opnum", FT_UINT16, BASE_DEC,
-             VALS(ubikdisk_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -108,6 +90,14 @@ proto_register_ubikdisk (void)
 void
 proto_reg_handoff_ubikdisk (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_ubikdisk, ett_ubikdisk, &uuid_ubikdisk, ver_ubikdisk, ubikdisk_dissectors, hf_ubikdisk_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_ubikdisk_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               ubikdisk_dissectors, array_length(ubikdisk_dissectors));
 }
index ac947f938b989502e2375727834d756851ea7d82..6714dc3c3bfb34e0ff7792b676c0914817f63f44 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/ncsubik/ubikvote_proc.idl
  *
- * $Id: packet-dcerpc-ubikvote.c,v 1.2 2002/10/15 05:21:02 guy Exp $
+ * $Id: packet-dcerpc-ubikvote.c,v 1.3 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -65,25 +65,13 @@ static dcerpc_sub_dissector ubikvote_dissectors[] = {
         { 0, NULL, NULL, NULL }
 };
 
-static const value_string ubikvote_opnum_vals[] = {
-       { 0, "Beacon" },
-       { 1, "Debug" },
-       { 2, "SDebug" },
-       { 3, "GetServerInterfaces" },
-       { 4, "GetSyncSite" },
-       { 5, "DebugV2" },
-       { 6, "SDebugV2" },
-       { 7, "GetSyncSiteIdentity" },
-        { 0, NULL }
-};
-
 void
 proto_register_ubikvote (void)
 {
        static hf_register_info hf[] = {
          { &hf_ubikvote_opnum,
            { "Operation", "ubikvote.opnum", FT_UINT16, BASE_DEC,
-             VALS(ubikvote_opnum_vals), 0x0, "Operation", HFILL }}
+             NULL, 0x0, "Operation", HFILL }}
        };
 
        static gint *ett[] = {
@@ -97,6 +85,14 @@ proto_register_ubikvote (void)
 void
 proto_reg_handoff_ubikvote (void)
 {
+       header_field_info *hf_info;
+
        /* Register the protocol as dcerpc */
        dcerpc_init_uuid (proto_ubikvote, ett_ubikvote, &uuid_ubikvote, ver_ubikvote, ubikvote_dissectors, hf_ubikvote_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_ubikvote_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               ubikvote_dissectors, array_length(ubikvote_dissectors));
 }
index 98d72f3c26b5ab5774d6255bc42a8d584332c5d2..fd9010b474f8566fd538ad896d56943b7a37fe5d 100644 (file)
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/update/update.idl
  *
- * $Id: packet-dcerpc-update.c,v 1.2 2002/10/23 04:35:52 guy Exp $
+ * $Id: packet-dcerpc-update.c,v 1.3 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -62,23 +62,13 @@ static dcerpc_sub_dissector dce_update_dissectors[] = {
   {0, NULL, NULL, NULL},
 };
 
-static const value_string dce_update_opnum_vals[] = {
-  {0, "UPDATE_GetServerInterfaces"},
-  {1, "UPDATE_FetchInfo"},
-  {2, "UPDATE_FetchFile"},
-  {3, "UPDATE_FetchObjectInfo"},
-  {0, NULL},
-};
-
-
-
 void
 proto_register_dce_update (void)
 {
   static hf_register_info hf[] = {
     {&hf_dce_update_opnum,
      {"Operation", "dce_update.opnum", FT_UINT16, BASE_DEC,
-      VALS (dce_update_opnum_vals), 0x0, "Operation", HFILL}}
+      NULL, 0x0, "Operation", HFILL}}
 
   };
 
@@ -94,8 +84,16 @@ proto_register_dce_update (void)
 void
 proto_reg_handoff_dce_update (void)
 {
+  header_field_info *hf_info;
+
   /* Register the protocol as dcerpc */
   dcerpc_init_uuid (proto_dce_update, ett_dce_update, &uuid_dce_update,
                    ver_dce_update, dce_update_dissectors,
                    hf_dce_update_opnum);
+
+  /* Set opnum strings from subdissector list */
+
+  hf_info = proto_registrar_get_nth(hf_dce_update_opnum);
+  hf_info->strings = value_string_from_subdissectors(
+         dce_update_dissectors, array_length(dce_update_dissectors));
 }
index 17afda54010f8ba81aeef6299ea3c55602e47d1e..e8cb9497c884c829d621c01928bb5d4c7d9f1f16 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001, Tim Potter <tpot@samba.org>
  * Copyright 2003, Richard Sharpe <rsharpe@richardsharpe.com>
  *
- * $Id: packet-dcerpc-wkssvc.c,v 1.25 2003/05/15 05:24:19 guy Exp $
+ * $Id: packet-dcerpc-wkssvc.c,v 1.26 2003/06/26 04:30:30 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -36,6 +36,7 @@
 #include "smb.h"
 
 static int proto_dcerpc_wkssvc = -1;
+static int hf_wkssvc_opnum = -1;
 static int hf_wkssvc_server = -1;
 static int hf_wkssvc_info_level = -1;
 static int hf_wkssvc_platform_id = -1; 
@@ -1047,6 +1048,9 @@ void
 proto_register_dcerpc_wkssvc(void)
 {
         static hf_register_info hf[] = { 
+         { &hf_wkssvc_opnum,
+           { "Operation", "wkssvc.opnum", FT_UINT16, BASE_DEC,
+             NULL, 0x0, "", HFILL }},
          { &hf_wkssvc_server,
            { "Server", "wkssvc.server", FT_STRING, BASE_NONE,
              NULL, 0x0, "Server Name", HFILL}},
@@ -1253,9 +1257,17 @@ proto_register_dcerpc_wkssvc(void)
 void
 proto_reg_handoff_dcerpc_wkssvc(void)
 {
+       header_field_info *hf_info;
+
         /* Register protocol as dcerpc */
 
         dcerpc_init_uuid(proto_dcerpc_wkssvc, ett_dcerpc_wkssvc,
                          &uuid_dcerpc_wkssvc, ver_dcerpc_wkssvc,
-                         dcerpc_wkssvc_dissectors, -1);
+                         dcerpc_wkssvc_dissectors, hf_wkssvc_opnum);
+
+       /* Set opnum strings from subdissector list */
+
+       hf_info = proto_registrar_get_nth(hf_wkssvc_opnum);
+       hf_info->strings = value_string_from_subdissectors(
+               dcerpc_wkssvc_dissectors, array_length(dcerpc_wkssvc_dissectors));
 }
index e8f4200a1b3d23b1ee82ef69b847057a7d735cc3..2dfa8b26e62751d0cb0a91b20dbc5b98c7e51153 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC packet disassembly
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc.c,v 1.132 2003/06/19 10:01:49 guy Exp $
+ * $Id: packet-dcerpc.c,v 1.133 2003/06/26 04:30:31 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -524,6 +524,28 @@ dcerpc_get_proto_name(e_uuid_t *uuid, guint16 ver)
     return sub_proto->name;
 }
 
+/* Create a value_string consisting of DCERPC opnum and name from a
+   subdissector array. */
+
+value_string *value_string_from_subdissectors(dcerpc_sub_dissector *sd, 
+                                             int num_sds)
+{
+       value_string *vs;
+       int i;
+
+       vs = g_malloc((num_sds + 1) * sizeof(value_string));
+
+       for (i = 0; i < num_sds; i++) {
+               vs[i].value = sd[i].num;
+               vs[i].strptr = sd[i].name;
+       }
+
+       vs[num_sds].value = 0;
+       vs[num_sds].strptr = NULL;
+
+       return vs;
+}
+
 /* Function to find the subdissector table of a registered protocol
  * or NULL if the protocol/version is not known to ethereal.
  */
index 9f25f1cdbb456a2aa7922f948860baea78a0a273..789a384a3d2797debda6f406f320a9bc41d81a2e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-dcerpc.h
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc.h,v 1.31 2003/02/24 01:22:20 guy Exp $
+ * $Id: packet-dcerpc.h,v 1.32 2003/06/26 04:30:31 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -212,6 +212,9 @@ void dcerpc_init_uuid (int proto, int ett, e_uuid_t *uuid, guint16 ver, dcerpc_s
 char *dcerpc_get_proto_name(e_uuid_t *uuid, guint16 ver);
 dcerpc_sub_dissector *dcerpc_get_proto_sub_dissector(e_uuid_t *uuid, guint16 ver);
 
+/* Create a opnum, name value_string from a subdissector list */
+
+value_string *value_string_from_subdissectors(dcerpc_sub_dissector *sd, int num_sds);
 
 /* Private data structure to pass to DCERPC dissector. This is used to
    pass transport specific information down to the dissector from the