aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.h
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 /epan/packet.h
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 'epan/packet.h')
-rw-r--r--epan/packet.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/packet.h b/epan/packet.h
index c9cfc5bca6..6af0d154af 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet.h,v 1.41 2001/11/26 05:41:13 hagbard Exp $
+ * $Id: packet.h,v 1.42 2001/11/27 07:13:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -194,6 +194,10 @@ extern void register_dissector(const char *name, dissector_t dissector,
/* Find a dissector by name. */
extern dissector_handle_t find_dissector(const char *name);
+/* Create an anonymous handle for a dissector. */
+extern dissector_handle_t create_dissector_handle(dissector_t dissector,
+ int proto);
+
/* Call a dissector through a handle. */
extern void call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree);