Correctly dissect LSA security descriptors, at least as they appear
[obnox/wireshark/wip.git] / packet-rwall.c
1 /* packet-rwall.c
2  *
3  * $Id: packet-rwall.c,v 1.5 2002/04/03 13:24:13 girlich Exp $
4  *
5  * Ethereal - Network traffic analyzer
6  * By Gerald Combs <gerald@ethereal.com>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22  */
23
24 #ifdef HAVE_CONFIG_H
25 #include "config.h"
26 #endif
27
28
29 #ifdef HAVE_SYS_TYPES_H
30 #include <sys/types.h>
31 #endif
32
33
34 #include "packet-rpc.h"
35 #include "packet-rwall.h"
36
37 static int proto_rwall = -1;
38 static int hf_rwall_message = -1;
39
40 static gint ett_rwall = -1;
41
42 static int
43 dissect_rwall_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
44 {
45         offset = dissect_rpc_string(tvb, tree, hf_rwall_message, offset, NULL);
46         
47         return offset;
48 }
49
50 static const vsff rwall_proc[] = {
51         { RWALL_WALL,   "RWALL",
52                 dissect_rwall_call,     NULL },
53         { 0,    NULL,   NULL,   NULL }
54 };
55
56
57 void
58 proto_register_rwall(void)
59 {
60         static hf_register_info hf[] = {
61                 { &hf_rwall_message, {
62                         "Message", "rwall.message", FT_STRING, BASE_DEC,
63                         NULL, 0, "Message", HFILL }},
64         };
65
66         static gint *ett[] = {
67                 &ett_rwall,
68         };
69
70         proto_rwall = proto_register_protocol("Remote Wall protocol",
71             "RWALL", "rwall");
72         proto_register_field_array(proto_rwall, hf, array_length(hf));
73         proto_register_subtree_array(ett, array_length(ett));
74 }
75
76 void
77 proto_reg_handoff_rwall(void)
78 {
79         /* Register the protocol as RPC */
80         rpc_init_prog(proto_rwall, RWALL_PROGRAM, ett_rwall);
81         /* Register the procedure tables */
82         rpc_init_proc_table(RWALL_PROGRAM, 1, rwall_proc);
83 }
84
85