warning: overflow in implicit constant conversion
[obnox/wireshark/wip.git] / packet-sadmind.c
1 /* packet-sadmind.c
2  * Stubs for the Solstice admin daemon RPC service
3  *
4  * Guy Harris <guy@alum.mit.edu>
5  *
6  * $Id: packet-sadmind.c,v 1.4 2002/11/01 00:48:39 sahlberg Exp $
7  *
8  * Ethereal - Network traffic analyzer
9  * By Gerald Combs <gerald@ethereal.com>
10  * Copyright 1998 Gerald Combs
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31
32
33 #include "packet-rpc.h"
34
35 static int proto_sadmind = -1;
36 static int hf_sadmind_procedure_v1 = -1;
37 static int hf_sadmind_procedure_v2 = -1;
38 static int hf_sadmind_procedure_v3 = -1;
39
40 static gint ett_sadmind = -1;
41
42 #define SADMIND_PROGRAM 100232
43
44 #define SADMINDPROC_NULL                0
45
46 /* proc number, "proc name", dissect_request, dissect_reply */
47 /* NULL as function pointer means: type of arguments is "void". */
48 static const vsff sadmind1_proc[] = {
49         { SADMINDPROC_NULL,     "NULL",
50                 NULL,   NULL },
51         { 0,    NULL,   NULL,   NULL }
52 };
53 static const value_string sadmind1_proc_vals[] = {
54         { SADMINDPROC_NULL,     "NULL" },
55         { 0,    NULL }
56 };
57
58 static const vsff sadmind2_proc[] = {
59         { SADMINDPROC_NULL,     "NULL",
60                 NULL,   NULL },
61         { 0,    NULL,   NULL,   NULL }
62 };
63 static const value_string sadmind2_proc_vals[] = {
64         { SADMINDPROC_NULL,     "NULL" },
65         { 0,    NULL }
66 };
67
68 static const vsff sadmind3_proc[] = {
69         { SADMINDPROC_NULL,     "NULL",
70                 NULL,   NULL },
71         { 0,    NULL,   NULL,   NULL }
72 };
73 static const value_string sadmind3_proc_vals[] = {
74         { SADMINDPROC_NULL,     "NULL" },
75         { 0,    NULL }
76 };
77
78 void
79 proto_register_sadmind(void)
80 {
81         static hf_register_info hf[] = {
82                 { &hf_sadmind_procedure_v1, {
83                         "V1 Procedure", "sadmind.procedure_v1", FT_UINT32, BASE_DEC,
84                         VALS(sadmind1_proc_vals), 0, "V1 Procedure", HFILL }},
85                 { &hf_sadmind_procedure_v2, {
86                         "V2 Procedure", "sadmind.procedure_v2", FT_UINT32, BASE_DEC,
87                         VALS(sadmind2_proc_vals), 0, "V2 Procedure", HFILL }},
88                 { &hf_sadmind_procedure_v3, {
89                         "V3 Procedure", "sadmind.procedure_v3", FT_UINT32, BASE_DEC,
90                         VALS(sadmind3_proc_vals), 0, "V3 Procedure", HFILL }}
91         };
92
93         static gint *ett[] = {
94                 &ett_sadmind,
95         };
96
97         proto_sadmind = proto_register_protocol("SADMIND", "SADMIND", "sadmind");
98         proto_register_field_array(proto_sadmind, hf, array_length(hf));
99         proto_register_subtree_array(ett, array_length(ett));
100 }
101
102 void
103 proto_reg_handoff_sadmind(void)
104 {
105         /* Register the protocol as RPC */
106         rpc_init_prog(proto_sadmind, SADMIND_PROGRAM, ett_sadmind);
107         /* Register the procedure tables */
108         rpc_init_proc_table(SADMIND_PROGRAM, 1, sadmind1_proc, hf_sadmind_procedure_v1);
109         rpc_init_proc_table(SADMIND_PROGRAM, 2, sadmind2_proc, hf_sadmind_procedure_v2);
110         rpc_init_proc_table(SADMIND_PROGRAM, 3, sadmind3_proc, hf_sadmind_procedure_v3);
111 }