Move the GSM SMS dissection to a dedicated subdissector (currently still within
[obnox/wireshark/wip.git] / packet-dcerpc-rs_plcy.c
1 /* packet-dcerpc-rs_plcy.c
2  *
3  * Routines for dcerpc RS_PLCY dissection
4  * Copyright 2003, 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 rs_plcy.idl
7  *
8  * $Id: packet-dcerpc-rs_plcy.c,v 1.1 2003/11/21 02:57:01 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 #include <glib.h>
34 #include <epan/packet.h>
35 #include "packet-dcerpc.h"
36
37 /* Global hf index fields */
38
39 static int proto_dcerpc_rs_plcy = -1;
40 static int hf_rs_plcy_opnum = -1;
41 static gint ett_dcerpc_rs_plcy = -1;
42
43 static e_uuid_t uuid_dcerpc_rs_plcy = {
44         0x4c878280, 0x4000, 0x0000,
45         { 0x0D, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00, 0x00 }
46 };
47
48 static guint16 ver_dcerpc_rs_plcy = 1;
49
50 static dcerpc_sub_dissector dcerpc_rs_plcy_dissectors[] = {
51         { 0,  "rs_properties_get_info", NULL, NULL },
52         { 1,  "rs_properties_set_info ", NULL, NULL },
53         { 2,  "rs_policy_get_info", NULL, NULL },
54         { 3,  "rs_policy_set_info", NULL, NULL },
55         { 4,  "rs_policy_get_effective", NULL, NULL },
56         { 5,  "rs_policy_get_override_info", NULL, NULL },
57         { 6,  "rs_policy_set_override_info", NULL, NULL },
58         { 7,  "rs_auth_policy_get_info", NULL, NULL },
59         { 8,  "rs_auth_policy_get_effective", NULL, NULL },
60         { 9,  "rs_auth_policy_set_info", NULL, NULL },
61         { 0, NULL, NULL,  NULL }
62 };
63
64 void
65 proto_register_dcerpc_rs_plcy(void)
66 {
67         static hf_register_info hf[] = {
68
69                 /* Global indexes */
70
71
72                 { &hf_rs_plcy_opnum,
73                   { "Operation", "rs_plcy.opnum", FT_UINT16, BASE_DEC,
74                     NULL, 0x0, "Operation", HFILL }},
75
76         };
77
78         static gint *ett[] = {
79                 &ett_dcerpc_rs_plcy
80         };
81
82         proto_dcerpc_rs_plcy = proto_register_protocol(
83                 "RS Interface properties", "RS_PLCY", "rs_plcy");
84
85         proto_register_field_array(proto_dcerpc_rs_plcy, hf,
86                 array_length(hf));
87
88         proto_register_subtree_array(ett, array_length(ett));
89 }
90
91 void
92 proto_reg_handoff_dcerpc_rs_plcy(void)
93 {
94         /* Register protocol as dcerpc */
95
96         dcerpc_init_uuid(proto_dcerpc_rs_plcy, ett_dcerpc_rs_plcy,
97                         &uuid_dcerpc_rs_plcy, ver_dcerpc_rs_plcy,
98                         dcerpc_rs_plcy_dissectors, hf_rs_plcy_opnum);
99 }