various string related changes, mainly replace sprintf/snprintf by g_snprintf
[obnox/wireshark/wip.git] / packet-dcerpc-cds_clerkserver.c
1 /* packet-dcerpc-cds_clerkserver.c
2  *
3  * Routines for cds_clerkserver  dissection
4  * Routines for dcerpc Afs4Int dissection
5  * Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.com>
6  * This information is based off the released idl files from opengroup.
7  * ftp://ftp.opengroup.org/pub/dce122/dce/src/directory.tar.gz directory/cds/stubs/cds_clerkserver.idl
8  *      
9  * $Id: packet-dcerpc-cds_clerkserver.c,v 1.5 2004/01/27 04:15:48 guy Exp $
10  *
11  * Ethereal - Network traffic analyzer
12  * By Gerald Combs <gerald@ethereal.com>
13  * Copyright 1998 Gerald Combs
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
28  */
29
30 #ifdef HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33
34
35 #ifdef HAVE_SYS_TYPES_H
36 #include <sys/types.h>
37 #endif
38
39 #include <string.h>
40
41 #include <glib.h>
42 #include <epan/packet.h>
43 #include "packet-dcerpc.h"
44
45
46 static int proto_cds_clerkserver = -1;
47 static int hf_cds_clerkserver_opnum = -1;
48
49
50 static gint ett_cds_clerkserver = -1;
51
52
53 static e_uuid_t uuid_cds_clerkserver = { 0x257df1c9, 0xc6d3, 0x11ca, { 0x85, 0x54, 0x08, 0x00, 0x2b, 0x1c, 0x8f, 0x1f } };
54 static guint16  ver_cds_clerkserver = 1;
55
56
57
58 static dcerpc_sub_dissector cds_clerkserver_dissectors[] = {
59     {  0, "AddReplica", NULL, NULL},
60     {  1, "AllowClearinghouses", NULL, NULL},
61     {  2, "Combine", NULL, NULL},
62     {  3, "CreateChild", NULL, NULL},
63     {  4, "CreateDirectory", NULL, NULL},
64     {  5, "CreateSoftLink", NULL, NULL},
65     {  6, "CreateObject", NULL, NULL},
66     {  7, "DeleteChild", NULL, NULL},
67     {  8, "DeleteObject", NULL, NULL},
68     {  9, "DeleteSoftLink", NULL, NULL},
69     { 10, "DeleteDirectory", NULL, NULL},
70     { 11, "DisallowClearinghouses", NULL, NULL},
71     { 12, "DoUpdate", NULL, NULL},
72     { 13, "EnumerateAttributes", NULL, NULL},
73     { 14, "EnumerateChildren", NULL, NULL},
74     { 15, "EnumerateObjects", NULL, NULL},
75     { 16, "EnumerateSoftLinks", NULL, NULL},
76     { 17, "LinkReplica", NULL, NULL},
77     { 18, "ModifyAttribute", NULL, NULL},
78     { 19, "ModifyReplica", NULL, NULL},
79     { 20, "NewEpoch", NULL, NULL},
80     { 21, "ReadAttribute", NULL, NULL},
81     { 22, "RemoveReplica", NULL, NULL},
82     { 23, "ResolveName", NULL, NULL},
83     { 24, "Skulk", NULL, NULL},
84     { 25, "TestAttribute", NULL, NULL},
85     { 26, "TestGroup", NULL, NULL},
86     { 0, NULL, NULL, NULL }
87 };
88
89 void
90 proto_register_cds_clerkserver (void)
91 {
92         static hf_register_info hf[] = {
93           { &hf_cds_clerkserver_opnum,
94             { "Operation", "cds_clerkserver.opnum", FT_UINT16, BASE_DEC,
95               NULL, 0x0, "Operation", HFILL }}
96         };
97
98         static gint *ett[] = {
99                 &ett_cds_clerkserver,
100         };
101         proto_cds_clerkserver = proto_register_protocol ("CDS Clerk Server Calls", "CDS_CLERK", "cds_clerkserver");
102         proto_register_field_array (proto_cds_clerkserver, hf, array_length (hf));
103         proto_register_subtree_array (ett, array_length (ett));
104 }
105
106 void
107 proto_reg_handoff_cds_clerkserver (void)
108 {
109         /* Register the protocol as dcerpc */
110         dcerpc_init_uuid (proto_cds_clerkserver, ett_cds_clerkserver, &uuid_cds_clerkserver, ver_cds_clerkserver, cds_clerkserver_dissectors, hf_cds_clerkserver_opnum);
111 }