An example stats_tree plugin using pinfo as its only data source
[obnox/wireshark/wip.git] / plugins / stats_tree / stats_tree_plugin.c
1 /* stats_tree_plugin.c
2 * Stats tree plugin registration file
3 * Automatically generated by make_stat_tree_registration.pl
4 *
5 * $Id:  $
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 #ifndef ENABLE_STATIC
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31 #include "plugins/plugin_api.h"
32 #include <gmodule.h>
33 #include "plugins/plugin_api_defs.h"
34 #include <epan/stats_tree.h>
35
36 extern void pinfo_stats_tree_init(stats_tree*);
37 extern int pinfo_stats_tree_packet(stats_tree*  , packet_info*, epan_dissect_t*, const void*);
38
39 G_MODULE_EXPORT const gchar version[] = "0.0";
40
41 G_MODULE_EXPORT void plugin_init(plugin_address_table_t *pat _U_ ) {
42         /* initialise the table of pointers needed in Win32 DLLs */
43         plugin_address_table_init(pat);
44
45         register_stats_tree("eth","Ethernet", pinfo_stats_tree_packet, pinfo_stats_tree_init );
46
47 }
48
49 G_MODULE_EXPORT void plugin_reg_handoff(void)
50 {
51 }
52 #endif