5e588153ccb2dd019047faca65eaa500c0406e51
[obnox/wireshark/wip.git] / packet-dcerpc-netlogon.c
1 /* packet-dcerpc-netlogon.c
2  * Routines for SMB \\PIPE\\NETLOGON packet disassembly
3  * Copyright 2001, Tim Potter <tpot@samba.org>
4  *
5  * $Id: packet-dcerpc-netlogon.c,v 1.1 2001/11/21 02:08:57 guy 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 <glib.h>
31 #include "packet.h"
32 #include "packet-dcerpc.h"
33 #include "packet-dcerpc-netlogon.h"
34
35 static int proto_dcerpc_netlogon = -1;
36 static gint ett_dcerpc_netlogon = -1;
37
38 static e_uuid_t uuid_dcerpc_netlogon = {
39         0x12345678, 0x1234, 0xabcd,
40         { 0xef, 0x00, 0x01, 0x23, 0x45, 0x67, 0xcf, 0xfb }
41 };
42
43 static guint16 ver_dcerpc_netlogon = 1;
44
45 static dcerpc_sub_dissector dcerpc_netlogon_dissectors[] = {
46         { NET_SAMLOGON, "NET_SAMLOGON", NULL, NULL },
47         { NET_SAMLOGOFF, "NET_SAMLOGOFF", NULL, NULL },
48         { NET_REQCHAL, "NET_REQCHAL", NULL, NULL },
49         { NET_AUTH, "NET_AUTH", NULL, NULL },
50         { NET_SRVPWSET, "NET_SRVPWSET", NULL, NULL },
51         { NET_SAM_DELTAS, "NET_SAM_DELTAS", NULL, NULL },
52         { NET_LOGON_CTRL, "NET_LOGON_CTRL", NULL, NULL },
53         { NET_AUTH2, "NET_AUTH2", NULL, NULL },
54         { NET_LOGON_CTRL2, "NET_LOGON_CTRL2", NULL, NULL },
55         { NET_SAM_SYNC, "NET_SAM_SYNC", NULL, NULL },
56         { NET_TRUST_DOM_LIST, "NET_TRUST_DOM_LIST", NULL, NULL },
57
58         {0, NULL, NULL,  NULL },
59 };
60
61 void 
62 proto_register_dcerpc_netlogon(void)
63 {
64         static gint *ett[] = {
65                 &ett_dcerpc_netlogon,
66         };
67
68         proto_dcerpc_netlogon = proto_register_protocol(
69                 "Microsoft Network Logon", "NETLOGON", "rpc_netlogon");
70
71         proto_register_subtree_array(ett, array_length(ett));
72 }
73
74 void
75 proto_reg_handoff_dcerpc_netlogon(void)
76 {
77         /* Register protocol as dcerpc */
78
79         dcerpc_init_uuid(proto_dcerpc_netlogon, ett_dcerpc_netlogon, 
80                          &uuid_dcerpc_netlogon, ver_dcerpc_netlogon, 
81                          dcerpc_netlogon_dissectors);
82 }