2 * Routines for stat dissection
4 * $Id: packet-stat.c,v 1.5 2000/04/04 06:46:28 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1998 Gerald Combs
10 * Copied from packet-smb.c
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 #ifdef HAVE_SYS_TYPES_H
33 #include <sys/types.h>
36 #include "packet-rpc.h"
37 #include "packet-stat.h"
39 static int proto_stat = -1;
41 static gint ett_stat = -1;
43 /* proc number, "proc name", dissect_request, dissect_reply */
44 /* NULL as function pointer means: take the generic one. */
46 const vsff stat_proc[] = {
47 { 0, "NULL", NULL, NULL },
48 { STATPROC_STAT, "STAT",
50 { STATPROC_MON, "MON",
52 { STATPROC_UNMON, "UNMON",
54 { STATPROC_UNMON_ALL, "UNMON_ALL",
56 { STATPROC_SIMU_CRASH, "SIMU_CRASH",
58 { STATPROC_NOTIFY, "NOTIFY",
60 { 0, NULL, NULL, NULL }
62 /* end of stat version 1 */
66 proto_register_stat(void)
69 static hf_register_info hf[] = {
71 "Path", "stat.path", FT_STRING, BASE_DEC,
75 static gint *ett[] = {
79 proto_stat = proto_register_protocol("Status Service", "stat");
81 proto_register_field_array(proto_stat, hf, array_length(hf));
83 proto_register_subtree_array(ett, array_length(ett));
87 proto_reg_handoff_stat(void)
89 /* Register the protocol as RPC */
90 rpc_init_prog(proto_stat, STAT_PROGRAM, ett_stat);
91 /* Register the procedure tables */
92 rpc_init_proc_table(STAT_PROGRAM, 1, stat_proc);