aboutsummaryrefslogtreecommitdiffstats
path: root/packet-h1.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-05 09:32:36 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-05 09:32:36 +0000
commit6bbfd97bde03e01dbf64173b9fd4e85747fabf8e (patch)
tree950d9eb832f91889530022ffd446ddf3b4772801 /packet-h1.c
parentdedc615898ca05105579430990f44a441fa44009 (diff)
downloadwireshark-6bbfd97bde03e01dbf64173b9fd4e85747fabf8e.tar.gz
wireshark-6bbfd97bde03e01dbf64173b9fd4e85747fabf8e.tar.bz2
wireshark-6bbfd97bde03e01dbf64173b9fd4e85747fabf8e.zip
Add routines to:
register lists of "heuristic" dissectors, which are handed a frame that may or may contain a payload for the protocol they dissect, and that return FALSE if it's not or dissect the packet and return TRUE if it is; add a dissector to such a list; go through such a list, calling each dissector until either a dissector returns TRUE, in which case the routine returns TRUE, or it runs out of entries in the list, in which case the routine returns FALSE. Have lists of heuristic dissectors for TCP and for COTP when used with the Inactive Subset of CLNP, and add the GIOP and Yahoo Messenger dissectors to the first list and the Sinec H1 dissector to the second list. Make the dissector name argument to "dissector_add()" and "dissector_delete()" a "const char *" rarther than just a "char *". Add "heur_dissector_add()", the routine to add a heuristic dissector to a list of heuristic dissectors, to the set of routines we can export to plugins through a table on platforms where dynamically-loaded code can't call stuff in the main program, and initialize the element in the table in question for "dissector_add()" (which we'd forgotten to do). svn path=/trunk/; revision=1909
Diffstat (limited to 'packet-h1.c')
-rw-r--r--packet-h1.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/packet-h1.c b/packet-h1.c
index 5c636caaa8..894b98935b 100644
--- a/packet-h1.c
+++ b/packet-h1.c
@@ -2,7 +2,7 @@
* Routines for Sinec H1 packet disassembly
* Gerrit Gehnen <G.Gehnen@atrie.de>
*
- * $Id: packet-h1.c,v 1.5 2000/04/28 19:35:40 guy Exp $
+ * $Id: packet-h1.c,v 1.6 2000/05/05 09:32:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -37,7 +37,6 @@
#include <glib.h>
#include "packet.h"
#include "globals.h"
-#include "packet-h1.h"
static int proto_h1 = -1;
static int hf_h1_header = -1;
@@ -101,7 +100,7 @@ static gint ett_response = -1;
static gint ett_empty = -1;
-gboolean
+static gboolean
dissect_h1 (const u_char * pd, int offset, frame_data * fd, proto_tree * tree)
{
proto_tree *h1_tree = NULL;
@@ -307,3 +306,9 @@ proto_register_h1 (void)
proto_register_field_array (proto_h1, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
}
+
+void
+proto_reg_handoff_h1(void)
+{
+ heur_dissector_add("cotp_is", dissect_h1);
+}