diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-11-16 23:17:27 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-11-16 23:17:27 +0000 |
commit | 7bd2e232a9994756ba0f97d4d93ce64fe885e7df (patch) | |
tree | 564e732958fa7b21a0ce2aaf6f0123b674ea3a71 /packet-mrdisc.c | |
parent | 21313199e4282797e5cbebb039c417cf8fca739f (diff) |
Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.
Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).
Change some direct dissector calls to go through handles.
svn path=/trunk/; revision=8979
Diffstat (limited to 'packet-mrdisc.c')
-rw-r--r-- | packet-mrdisc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-mrdisc.c b/packet-mrdisc.c index 525fab1fa2..c0975730db 100644 --- a/packet-mrdisc.c +++ b/packet-mrdisc.c @@ -1,7 +1,7 @@ /* packet-mrdisc.c 2001 Ronnie Sahlberg <See AUTHORS for email> * Routines for IGMP/MRDISC packet disassembly * - * $Id: packet-mrdisc.c,v 1.9 2002/08/28 21:00:22 jmayer Exp $ + * $Id: packet-mrdisc.c,v 1.10 2003/11/16 23:17:19 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -188,7 +188,7 @@ dissect_mrdisc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int o proto_item *item; guint8 type; - if (!proto_is_protocol_enabled(proto_mrdisc)) { + if (!proto_is_protocol_enabled(find_protocol_by_id(proto_mrdisc))) { /* we are not enabled, skip entire packet to be nice to the igmp layer. (so clicking on IGMP will display the data) */ |