aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/epan/packet.c b/epan/packet.c
index a1701bb38e..ad0e9a69c1 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.42 2001/11/26 05:41:12 hagbard Exp $
+ * $Id: packet.c,v 1.43 2001/11/27 07:13:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -790,6 +790,20 @@ find_dissector(const char *name)
return g_hash_table_lookup(registered_dissectors, name);
}
+/* Create an anonymous handle for a dissector. */
+dissector_handle_t
+create_dissector_handle(dissector_t dissector, int proto)
+{
+ struct dissector_handle *handle;
+
+ handle = g_malloc(sizeof (struct dissector_handle));
+ handle->name = NULL;
+ handle->dissector = dissector;
+ handle->proto_index = proto;
+
+ return handle;
+}
+
/* Register a dissector by name. */
void
register_dissector(const char *name, dissector_t dissector, int proto)