New tap for tethereal: io statistics that provides frames/bytes counts for frames...
[obnox/wireshark/wip.git] / packet-dcerpc-rs_repadm.c
1 /* packet-dcerpc-rs_repadm.c\r
2  *\r
3  * Routines for dcerpc Registry server administration operations.\r
4  * Copyright 2002, Jaime Fournier <jafour1@yahoo.com>\r
5  * This information is based off the released idl files from opengroup.\r
6  * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz  security/idl/rs_repadm.idl\r
7  *\r
8  * $Id: packet-dcerpc-rs_repadm.c,v 1.1 2002/09/11 09:34:28 sahlberg Exp $\r
9  *\r
10  * Ethereal - Network traffic analyzer\r
11  * By Gerald Combs <gerald@ethereal.com>\r
12  * Copyright 1998 Gerald Combs\r
13  *\r
14  * This program is free software; you can redistribute it and/or\r
15  * modify it under the terms of the GNU General Public License\r
16  * as published by the Free Software Foundation; either version 2\r
17  * of the License, or (at your option) any later version.\r
18  *\r
19  * This program is distributed in the hope that it will be useful,\r
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
22  * GNU General Public License for more details.\r
23  *\r
24  * You should have received a copy of the GNU General Public License\r
25  * along with this program; if not, write to the Free Software\r
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
27  */\r
28 \r
29 #ifdef HAVE_CONFIG_H\r
30 #include "config.h"\r
31 #endif\r
32 \r
33 \r
34 #ifdef HAVE_SYS_TYPES_H\r
35 #include <sys/types.h>\r
36 #endif\r
37 \r
38 #include <string.h>\r
39 \r
40 #include <glib.h>\r
41 #include <epan/packet.h>\r
42 #include "packet-dcerpc.h"\r
43 \r
44 \r
45 static int proto_rs_repadm = -1;\r
46 static int hf_rs_repadm_opnum = -1;\r
47 \r
48 \r
49 static gint ett_rs_repadm = -1;\r
50 \r
51 \r
52 static e_uuid_t uuid_rs_repadm = { 0x5b8c2fa8, 0xb60b, 0x11c9, { 0xbe, 0x0f, 0x08, 0x00, 0x1e, 0x01, 0x8f, 0xa0 } };\r
53 static guint16  ver_rs_repadm = 1.1;\r
54 \r
55 \r
56 \r
57          \r
58 static dcerpc_sub_dissector rs_repadm_dissectors[] = {\r
59     { 0, "rs_rep_admin_stop", NULL, NULL},\r
60     { 1, "rs_rep_admin_maint", NULL, NULL},\r
61     { 2, "rs_rep_admin_mkey", NULL, NULL},\r
62     { 3, "rs_rep_admin_info", NULL, NULL},\r
63     { 4, "rs_rep_admin_info_full", NULL, NULL},\r
64     { 5, "rs_rep_admin_destroy", NULL, NULL},\r
65     { 6, "rs_rep_admin_init_replica", NULL, NULL},\r
66     { 7, "rs_rep_admin_change_master", NULL, NULL},\r
67     { 8, "rs_rep_admin_become_master", NULL, NULL},\r
68     { 9, "rs_rep_admin_become_slave", NULL, NULL},\r
69     { 10, "rs_rep_admin_set_sw_rev", NULL, NULL},\r
70     { 11, "rs_rep_admin_get_sw_vers_info", NULL, NULL},\r
71     { 0, NULL, NULL, NULL }\r
72 };\r
73 \r
74 \r
75 static const value_string rs_repadm_opnum_vals[] = {\r
76     { 0, "rs_rep_admin_stop" },\r
77     { 1, "rs_rep_admin_maint" },\r
78     { 2, "rs_rep_admin_mkey" },\r
79     { 3, "rs_rep_admin_info" },\r
80     { 4, "rs_rep_admin_info_full" },\r
81     { 5, "rs_rep_admin_destroy" },\r
82     { 6, "rs_rep_admin_init_replica" },\r
83     { 7, "rs_rep_admin_change_master" },\r
84     { 8, "rs_rep_admin_become_master" },\r
85     { 9, "rs_rep_admin_become_slave" },\r
86     { 10, "rs_rep_admin_set_sw_rev" },\r
87     { 11, "rs_rep_admin_get_sw_vers_info" },\r
88     { 0, NULL }\r
89 };\r
90 \r
91 \r
92 void\r
93 proto_register_rs_repadm (void)\r
94 {\r
95         static hf_register_info hf[] = {\r
96         { &hf_rs_repadm_opnum,\r
97                 { "Operation", "rs_repadmin.opnum", FT_UINT16, BASE_DEC, VALS(rs_repadm_opnum_vals), 0x0, "Operation", HFILL }}\r
98         };\r
99 \r
100         static gint *ett[] = {\r
101                 &ett_rs_repadm,\r
102         };\r
103         proto_rs_repadm = proto_register_protocol ("Registry server administration operations.", "RS_REPADM", "rs_repadm");\r
104         proto_register_field_array (proto_rs_repadm, hf, array_length (hf));\r
105         proto_register_subtree_array (ett, array_length (ett));\r
106 }\r
107 \r
108 void\r
109 proto_reg_handoff_rs_repadm (void)\r
110 {\r
111         /* Register the protocol as dcerpc */\r
112         dcerpc_init_uuid (proto_rs_repadm, ett_rs_repadm, &uuid_rs_repadm, ver_rs_repadm, rs_repadm_dissectors, hf_rs_repadm_opnum);\r
113 }\r