Don't include the header file to get the SNMP version unless we're
[obnox/wireshark/wip.git] / packet-dcerpc-krb5rpc.c
1 /* packet-dcerpc-krb5rpc.c\r
2  *\r
3  * Routines for dcerpc DCE/KRB5 interface\r
4  * Copyright 2002, Jaime Fournier <jafour1@yahoo.com>\r
5  * This information is based off the released idl files from opengroup.\r
6  * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz security/idl/krb5rpc.idl\r
7  *\r
8  *\r
9  * $Id: packet-dcerpc-krb5rpc.c,v 1.1 2002/09/13 09:59:21 sahlberg Exp $\r
10  *\r
11  * Ethereal - Network traffic analyzer\r
12  * By Gerald Combs <gerald@ethereal.com>\r
13  * Copyright 1998 Gerald Combs\r
14  *\r
15  * This program is free software; you can redistribute it and/or\r
16  * modify it under the terms of the GNU General Public License\r
17  * as published by the Free Software Foundation; either version 2\r
18  * of the License, or (at your option) any later version.\r
19  *\r
20  * This program is distributed in the hope that it will be useful,\r
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
23  * GNU General Public License for more details.\r
24  *\r
25  * You should have received a copy of the GNU General Public License\r
26  * along with this program; if not, write to the Free Software\r
27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
28  */\r
29 \r
30 #ifdef HAVE_CONFIG_H\r
31 #include "config.h"\r
32 #endif\r
33 \r
34 \r
35 #ifdef HAVE_SYS_TYPES_H\r
36 #include <sys/types.h>\r
37 #endif\r
38 \r
39 #include <string.h>\r
40 \r
41 #include <glib.h>\r
42 #include <epan/packet.h>\r
43 #include "packet-dcerpc.h"\r
44 \r
45 \r
46 static int proto_krb5rpc = -1;\r
47 static int hf_krb5rpc_opnum = -1;\r
48 \r
49 \r
50 static gint ett_krb5rpc = -1;\r
51 \r
52 \r
53 static e_uuid_t uuid_krb5rpc = { 0x8f73de50, 0x768c, 0x11ca, { 0xbf, 0xfc, 0x08, 0x00, 0x1e, 0x03, 0x94, 0x31 } };\r
54 static guint16  ver_krb5rpc = 1;\r
55 \r
56 \r
57 static dcerpc_sub_dissector krb5rpc_dissectors[] = {\r
58         { 0, "rsec_krb5rpc_sendto_kdc", NULL, NULL },\r
59         { 0, NULL, NULL, NULL }\r
60 };\r
61 \r
62 static const value_string krb5rpc_opnum_vals[] = {\r
63         { 0, "rsec_krb5rpc_sendto_kdc" },\r
64         { 0, NULL }\r
65 };\r
66 \r
67 void\r
68 proto_register_krb5rpc (void)\r
69 {\r
70         static hf_register_info hf[] = {\r
71           { &hf_krb5rpc_opnum,\r
72             { "Operation", "krb5rpc.opnum", FT_UINT16, BASE_DEC,\r
73               VALS(krb5rpc_opnum_vals), 0x0, "Operation", HFILL }}\r
74         };\r
75 \r
76         static gint *ett[] = {\r
77                 &ett_krb5rpc,\r
78         };\r
79         proto_krb5rpc = proto_register_protocol ("DCE/RPC Kerberos V", "KRB5RPC", "krb5rpc");\r
80         proto_register_field_array (proto_krb5rpc, hf, array_length (hf));\r
81         proto_register_subtree_array (ett, array_length (ett));\r
82 }\r
83 \r
84 void\r
85 proto_reg_handoff_krb5rpc (void)\r
86 {\r
87         /* Register the protocol as dcerpc */\r
88         dcerpc_init_uuid (proto_krb5rpc, ett_krb5rpc, &uuid_krb5rpc, ver_krb5rpc, krb5rpc_dissectors, hf_krb5rpc_opnum);\r
89 }\r