5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #define NEW_PROTO_TREE_API
28 #include "packet-rpc.h"
29 #include "packet-rwall.h"
31 static header_field_info
*hfi_rwall
= NULL
;
33 #define RWALL_HFI_INIT HFI_INIT(proto_rwall)
35 static const value_string rwall1_proc_vals
[] = {
36 { RWALL_WALL
, "RWALL" },
40 static header_field_info hfi_rwall_procedure_v1 RWALL_HFI_INIT
= {
41 "V1 Procedure", "rwall.procedure_v1", FT_UINT32
, BASE_DEC
,
42 VALS(rwall1_proc_vals
), 0, NULL
, HFILL
};
44 static header_field_info hfi_rwall_message RWALL_HFI_INIT
= {
45 "Message", "rwall.message", FT_STRING
, BASE_NONE
,
46 NULL
, 0, NULL
, HFILL
};
48 static gint ett_rwall
= -1;
51 dissect_rwall_call(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
53 offset
= dissect_rpc_string(tvb
, tree
, hfi_rwall_message
.id
, offset
, NULL
);
58 static const vsff rwall1_proc
[] = {
59 { RWALL_WALL
, "RWALL", dissect_rwall_call
, NULL
},
60 { 0, NULL
, NULL
, NULL
}
64 proto_register_rwall(void)
66 #ifndef HAVE_HFI_SECTION_INIT
67 static header_field_info
*hfi
[] = {
68 &hfi_rwall_procedure_v1
,
73 static gint
*ett
[] = {
79 proto_rwall
= proto_register_protocol("Remote Wall protocol", "RWALL", "rwall");
80 hfi_rwall
= proto_registrar_get_nth(proto_rwall
);
82 proto_register_fields(proto_rwall
, hfi
, array_length(hfi
));
83 proto_register_subtree_array(ett
, array_length(ett
));
87 proto_reg_handoff_rwall(void)
89 /* Register the protocol as RPC */
90 rpc_init_prog(hfi_rwall
->id
, RWALL_PROGRAM
, ett_rwall
);
91 /* Register the procedure tables */
92 rpc_init_proc_table(RWALL_PROGRAM
, 1, rwall1_proc
, hfi_rwall_procedure_v1
.id
);