aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fr.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-27 07:13:32 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-27 07:13:32 +0000
commit07b2709f8a32951cc2503d2e048d662a01cb472c (patch)
tree21d265bf7402a2739905bd87227383ae0a9f78ab /packet-fr.c
parentfd456eaf0b5af46449882983b95529e073fd989f (diff)
Change "conversation_set_dissector()" to take a dissector handle, rather
than a pointer to a dissector function, as an argument. This means that the conversation dissector is called through "call_dissector()", so the dissector itself doesn't have to worry about checking whether the protocol is enabled or setting "pinfo->current_proto", so get rid of the code that does that in conversation dissectors. Also, make the conversation dissectors static. Get rid of some direct calls to dissectors; replace them with calls through handles, and, again, get rid of code to check whether a protocol is enabled and set "pinfo->current_proto" where that code isn't needed. Make those dissectors static if they aren't already static. Add a routine "create_dissector_handle()" to create a dissector handle without registering it by name, if the dissector isn't used outside the module in which it's defined. svn path=/trunk/; revision=4281
Diffstat (limited to 'packet-fr.c')
-rw-r--r--packet-fr.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/packet-fr.c b/packet-fr.c
index 76854b634e..c03160ba7d 100644
--- a/packet-fr.c
+++ b/packet-fr.c
@@ -3,12 +3,11 @@
*
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-fr.c,v 1.20 2001/11/26 05:13:11 hagbard Exp $
+ * $Id: packet-fr.c,v 1.21 2001/11/27 07:13:25 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -48,7 +47,6 @@
#include <string.h>
#include <glib.h>
#include "packet.h"
-#include "packet-fr.h"
#include "packet-osi.h"
#include "packet-llc.h"
#include "packet-chdlc.h"
@@ -234,14 +232,12 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
-void dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo,
+ proto_tree *tree)
{
proto_item *ti = NULL;
proto_tree *fr_tree = NULL;
- CHECK_DISPLAY_AS_X(data_handle,proto_fr, tvb, pinfo, tree);
-
- pinfo->current_proto = "Frame Relay";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "FR");
if (check_col(pinfo->fd, COL_INFO))
@@ -422,6 +418,8 @@ void proto_register_fr(void)
proto_register_subtree_array(ett, array_length(ett));
fr_subdissector_table = register_dissector_table("fr.ietf");
+
+ register_dissector("fr", dissect_fr_uncompressed, proto_fr);
}
void proto_reg_handoff_fr(void)