Obscure more email addresses.
[obnox/wireshark/wip.git] / packet-dcerpc-nspi.c
1 /* packet-dcerpc-nspi.c
2  * Routines for dcerpc nspi dissection
3  * Copyright 2001, Todd Sabin <tsabin@optonline.net>
4  *
5  * $Id: packet-dcerpc-nspi.c,v 1.4 2002/08/02 23:35:48 jmayer Exp $
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@ethereal.com>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29
30 #include <string.h>
31
32 #include <glib.h>
33 #include <epan/packet.h>
34 #include "packet-dcerpc.h"
35
36 static int proto_nspi = -1;
37
38 static int hf_nspi_opnum = -1;
39
40 static gint ett_nspi = -1;
41
42 static e_uuid_t uuid_nspi = { 0xf5cc5a18, 0x4264, 0x101a, { 0x8c, 0x59, 0x08, 0x00, 0x2b, 0x2f, 0x84, 0x26 } };
43 static guint16  ver_nspi = 56;
44
45 static dcerpc_sub_dissector nspi_dissectors[] = {
46     { 0, "NspiBind", NULL, NULL },
47     { 1, "NspiUnbind", NULL, NULL },
48     { 2, "NspiUpdateStat", NULL, NULL },
49     { 3, "NspiQueryRows", NULL, NULL },
50     { 4, "NspiSeekEntries", NULL, NULL },
51     { 5, "NspiGetMatches", NULL, NULL },
52     { 6, "NspiResortRestriction", NULL, NULL },
53     { 7, "NspiDNToEph", NULL, NULL },
54     { 8, "NspiGetPropList", NULL, NULL },
55     { 9, "NspiGetProps", NULL, NULL },
56     { 10, "NspiCompareDNTs", NULL, NULL },
57     { 11, "NspiModProps", NULL, NULL },
58     { 12, "NspiGetHierarchyInfo", NULL, NULL },
59     { 13, "NspiGetTemplateInfo", NULL, NULL },
60     { 14, "NspiModLinkAttr", NULL, NULL },
61     { 15, "NspiDeleteEntries", NULL, NULL },
62     { 16, "NspiQueryColumns", NULL, NULL },
63     { 17, "NspiGetNamesFromIDs", NULL, NULL },
64     { 18, "NspiGetIDsFromNames", NULL, NULL },
65     { 19, "NspiResolveNames", NULL, NULL },
66     { 0, NULL, NULL, NULL }
67 };
68
69 static const value_string nspi_opnum_vals[] = {
70     { 0, "Bind" },
71     { 1, "Unbind" },
72     { 2, "UpdateStat" },
73     { 3, "QueryRows" },
74     { 4, "SeekEntries" },
75     { 5, "GetMatches" },
76     { 6, "ResortRestriction" },
77     { 7, "DNToEph" },
78     { 8, "GetPropList" },
79     { 9, "GetProps" },
80     { 10, "CompareDNTs" },
81     { 11, "ModProps" },
82     { 12, "GetHierarchyInfo" },
83     { 13, "GetTemplateInfo" },
84     { 14, "ModLinkAttr" },
85     { 15, "DeleteEntries" },
86     { 16, "QueryColumns" },
87     { 17, "GetNamesFromIDs" },
88     { 18, "GetIDsFromNames" },
89     { 19, "ResolveNames" },
90     { 0, NULL }
91 };
92
93
94 void
95 proto_register_nspi (void)
96 {
97    static hf_register_info hf[] = {
98            { &hf_nspi_opnum,
99              { "Operation", "nspi.opnum", FT_UINT16, BASE_DEC,
100                VALS(nspi_opnum_vals), 0x0, "Operation", HFILL }},
101    };
102
103    static gint *ett[] = {
104        &ett_nspi
105    };
106    proto_nspi = proto_register_protocol ("NSPI", "NSPI", "nspi");
107    proto_register_field_array(proto_nspi, hf, array_length(hf));
108    proto_register_subtree_array (ett, array_length (ett));
109 }
110
111 void
112 proto_reg_handoff_nspi (void)
113 {
114    /* Register the protocol as dcerpc */
115    dcerpc_init_uuid (proto_nspi, ett_nspi, &uuid_nspi, ver_nspi, nspi_dissectors, hf_nspi_opnum);
116 }