Rename "proto_alloc_dfilter_string()" to
[obnox/wireshark/wip.git] / packet-dcerpc-roverride.c
1 /* packet-dcerpc-roverride.c
2  *
3  * Routines for Remote Override Interface
4  * Copyright 2002, Jaime Fournier <jafour1@yahoo.com>
5  * This information is based off the released idl files from opengroup.
6  * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz security/idl/roverride.idl
7  *
8  * $Id: packet-dcerpc-roverride.c,v 1.2 2002/11/08 19:42:39 guy Exp $
9  *
10  * Ethereal - Network traffic analyzer
11  * By Gerald Combs <gerald@ethereal.com>
12  * Copyright 1998 Gerald Combs
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27  */
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33
34 #ifdef HAVE_SYS_TYPES_H
35 #include <sys/types.h>
36 #endif
37
38 #include <string.h>
39
40 #include <glib.h>
41 #include <epan/packet.h>
42 #include "packet-dcerpc.h"
43
44
45 static int proto_roverride = -1;
46 static int hf_roverride_opnum = -1;
47
48
49 static gint ett_roverride = -1;
50
51
52 static e_uuid_t uuid_roverride = { 0x5d978990, 0x4851, 0x11ca, { 0x99, 0x37, 0x08, 0x00, 0x1e, 0x03, 0x94, 0x48 } };
53 static guint16  ver_roverride = 1;
54
55
56 static dcerpc_sub_dissector roverride_dissectors[] = {
57     { 0, "roverride_get_login_info", NULL, NULL},
58     { 1, "roverride_check_passwd", NULL, NULL},
59     { 2, "roverride_is_passwd_overridden", NULL, NULL},
60     { 3, "roverride_get_by_unix_num", NULL, NULL},
61     { 4, "roverride_get_group_info", NULL, NULL},
62     { 5, "roverride_check_group_passwd", NULL, NULL},
63     { 6, "roverride_is_grp_pwd_overridden", NULL, NULL},
64     { 0, NULL, NULL, NULL }
65 };
66
67 static const value_string roverride_opnum_vals[] = {
68     { 0, "roverride_get_login_info" },
69     { 1, "roverride_check_passwd" },
70     { 2, "roverride_is_passwd_overridden" },
71     { 3, "roverride_get_by_unix_num" },
72     { 4, "roverride_get_group_info" },
73     { 5, "roverride_check_group_passwd" },
74     { 6, "roverride_is_grp_pwd_overridden" },
75     { 0, NULL }
76 };
77
78 void
79 proto_register_roverride (void)
80 {
81         static hf_register_info hf[] = {
82       { &hf_roverride_opnum,
83          { "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, VALS(roverride_opnum_vals), 0x0, "Operation", HFILL }},
84         };
85
86         static gint *ett[] = {
87                 &ett_roverride,
88         };
89         proto_roverride = proto_register_protocol ("Remote Override interface", "roverride", "roverride");
90         proto_register_field_array (proto_roverride, hf, array_length (hf));
91         proto_register_subtree_array (ett, array_length (ett));
92 }
93
94 void
95 proto_reg_handoff_roverride (void)
96 {
97         /* Register the protocol as dcerpc */
98         dcerpc_init_uuid (proto_roverride, ett_roverride, &uuid_roverride, ver_roverride, roverride_dissectors, hf_roverride_opnum);
99 }