6e6da421d3a623cab3949558df481e4ffa7a00eb
[obnox/wireshark/wip.git] / plugins / mate / mate_plugin.c
1 /* mate_plugin.c
2 * MATE -- Meta Analysis Tracing Engine
3 *
4 * Copyright 2004, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
5 *
6 * $Id$
7 *
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
11 *
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.
16
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.
21
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.
25 */
26
27 /* this file is used temporarily to buid MATE as a plugin */
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33 #include <glib.h>
34
35 #ifndef ENABLE_STATIC
36 #include "moduleinfo.h"
37 #include <gmodule.h>
38 #endif
39
40 /* these two are in packet-mate.c */
41 void proto_register_mate(void);
42 void proto_reg_handoff_mate(void);
43
44
45 static gboolean initialized = FALSE;
46
47 #ifndef ENABLE_STATIC
48 G_MODULE_EXPORT const gchar version[] = VERSION;
49
50 G_MODULE_EXPORT void plugin_register(void) {
51         
52         if (! initialized ) {
53                 proto_register_mate();
54                 initialized = 1;
55         }
56 }
57
58 G_MODULE_EXPORT void plugin_reg_handoff(void)
59 {
60         proto_reg_handoff_mate();
61 }
62 #endif