as I've experienced a scrollbar again while having 7 interfaces, I've tried to add...
[obnox/wireshark/wip.git] / plugins / profinet / profinet.c
1 /* profinet-plugin.c
2  * Routines for the PROFINET plugin
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1999 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 /* Include files */
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31 #include "moduleinfo.h"
32 #include <gmodule.h>
33
34 #include <glib.h>
35
36 /* Define version if we are not building ethereal statically */
37
38 #ifndef ENABLE_STATIC
39 G_MODULE_EXPORT const gchar version[] = VERSION;
40 #endif
41
42 gboolean plugin_registered = FALSE;
43
44 /* XXX */
45 extern void proto_register_pn_io (void);
46 extern void proto_reg_handoff_pn_io (void);
47 extern void proto_register_pn_dcp (void);
48 extern void proto_reg_handoff_pn_dcp (void);
49 extern void proto_register_pn_ptcp (void);
50 extern void proto_reg_handoff_pn_ptcp (void);
51
52 /* Start the functions we need for the plugin stuff */
53
54 #ifndef ENABLE_STATIC
55
56 G_MODULE_EXPORT void
57 plugin_register(void)
58 {
59   /* register the new protocol, protocol fields, and subtrees */
60   if (plugin_registered == FALSE) { /* execute protocol initialization only once */
61     proto_register_pn_io();
62     proto_register_pn_dcp();
63     proto_register_pn_ptcp();
64           
65         plugin_registered = TRUE;
66   }
67 }
68
69 G_MODULE_EXPORT void
70 plugin_reg_handoff(void){
71   proto_reg_handoff_pn_io();
72   proto_reg_handoff_pn_dcp();
73   proto_reg_handoff_pn_ptcp();
74 }
75
76 #endif
77
78 /* End the functions we need for plugin stuff */
79