aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/gryphon
diff options
context:
space:
mode:
authorEd Warnicke <hagbard@physics.rutgers.edu>2001-07-08 21:51:34 +0000
committerEd Warnicke <hagbard@physics.rutgers.edu>2001-07-08 21:51:34 +0000
commitde98ec2efa11e0d31344de3231acffcf6d16bbd5 (patch)
treec4549235ff8beec4866db90728a823c7bf80b0a0 /plugins/gryphon
parentbf877ca5c5adafe44fe93da79835806c0d6f8e10 (diff)
Fixed the {tethereal,ethereal}_static targets so that the
static binaries have the dissectors provided in the plugins available. svn path=/trunk/; revision=3665
Diffstat (limited to 'plugins/gryphon')
-rw-r--r--plugins/gryphon/Makefile.am7
-rw-r--r--plugins/gryphon/moduleinfo.h2
-rw-r--r--plugins/gryphon/packet-gryphon.c46
3 files changed, 36 insertions, 19 deletions
diff --git a/plugins/gryphon/Makefile.am b/plugins/gryphon/Makefile.am
index b464e34826..eb4f77b53b 100644
--- a/plugins/gryphon/Makefile.am
+++ b/plugins/gryphon/Makefile.am
@@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal/Gryphon
#
-# $Id: Makefile.am,v 1.6 2000/03/03 12:01:22 gram Exp $
+# $Id: Makefile.am,v 1.7 2001/07/08 21:51:32 hagbard Exp $
#
# Ethereal - Network traffic analyzer
# By Steve Limkemann <stevelim@dgtech.com>
@@ -36,6 +36,11 @@ gryphon_la_LDFLAGS = -module -avoid-version
# add them here.
LIBS =
+noinst_PROGRAMS = packet-gryphon-static.o
+
+packet-gryphon-static.o: packet-gryphon.c moduleinfo.h
+ $(LTCOMPILE) -c -o packet-gryphon-static.o -D__ETHEREAL_STATIC__ packet-gryphon.c
+
CLEANFILES = \
gryphon \
*~
diff --git a/plugins/gryphon/moduleinfo.h b/plugins/gryphon/moduleinfo.h
index 0f8e458a07..b29fa047a5 100644
--- a/plugins/gryphon/moduleinfo.h
+++ b/plugins/gryphon/moduleinfo.h
@@ -13,5 +13,5 @@
#endif
/* Version number of package */
-#define VERSION "0.0.3"
+#define VERSION "0.0.4"
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index 8ed36992f4..7355dc1837 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -1,7 +1,7 @@
/* packet-gryphon.c
* Routines for Gryphon protocol packet disassembly
*
- * $Id: packet-gryphon.c,v 1.22 2001/06/18 02:18:25 guy Exp $
+ * $Id: packet-gryphon.c,v 1.23 2001/07/08 21:51:32 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Steve Limkemann <stevelim@dgtech.com>
@@ -48,7 +48,9 @@
#include "packet.h"
#include "packet-gryphon.h"
+#ifndef __ETHEREAL_STATIC__
G_MODULE_EXPORT const gchar version[] = VERSION;
+#endif
#ifndef G_HAVE_GINT64
#error "Sorry, this won't compile without 64-bit integer support"
@@ -1816,8 +1818,8 @@ blm_mode(tvbuff_t *tvb, int offset, int src, int msglen, proto_tree *pt)
return offset;
}
-G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat)
+void
+proto_register_gryphon(void)
{
static hf_register_info hf[] = {
{ &hf_gryph_src,
@@ -1859,22 +1861,32 @@ plugin_init(plugin_address_table_t *pat)
&ett_gryphon_pgm_status,
&ett_gryphon_pgm_options,
};
- plugin_address_table_init(pat);
- if (proto_gryphon == -1) {
- /* first activation */
- proto_gryphon = proto_register_protocol("DG Gryphon Protocol",
- "Gryphon",
- "gryphon");
- proto_register_field_array(proto_gryphon, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
- } else {
- /* do nothing, this is in fact a re-activation with possibly
- a new filter */
- }
+ proto_gryphon = proto_register_protocol("DG Gryphon Protocol",
+ "Gryphon",
+ "gryphon");
+ proto_register_field_array(proto_gryphon, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
-G_MODULE_EXPORT void
-plugin_reg_handoff(void)
+void
+proto_reg_handoff_gryphon(void)
{
dissector_add("tcp.port", 7000, &dissect_gryphon, proto_gryphon);
}
+
+/* Start the functions we need for the plugin stuff */
+G_MODULE_EXPORT void
+plugin_reg_handoff(void){
+ proto_reg_handoff_gryphon();
+}
+
+G_MODULE_EXPORT void
+plugin_init(plugin_address_table_t *pat){
+ /* initialise the table of pointers needed in Win32 DLLs */
+ plugin_address_table_init(pat);
+ /* register the new protocol, protocol fields, and subtrees */
+ if (proto_gryphon == -1) { /* execute protocol initialization only once */
+ proto_register_gryphon();
+ }
+}
+/* End the functions we need for plugin stuff */