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-snmp.c | |
parent | 21313199e4282797e5cbebb039c417cf8fca739f (diff) | |
download | wireshark-7bd2e232a9994756ba0f97d4d93ce64fe885e7df.tar.gz wireshark-7bd2e232a9994756ba0f97d4d93ce64fe885e7df.tar.bz2 wireshark-7bd2e232a9994756ba0f97d4d93ce64fe885e7df.zip |
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-snmp.c')
-rw-r--r-- | packet-snmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-snmp.c b/packet-snmp.c index b8b9b4f08d..19026b8cdb 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -10,7 +10,7 @@ * * See RFCs 2570-2576 for SNMPv3 * - * $Id: packet-snmp.c,v 1.122 2003/11/02 23:12:31 gerald Exp $ + * $Id: packet-snmp.c,v 1.123 2003/11/16 23:17:22 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1653,7 +1653,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_PROTOCOL)) { col_set_str(pinfo->cinfo, COL_PROTOCOL, - proto_get_protocol_short_name(proto)); + proto_get_protocol_short_name(find_protocol_by_id(proto))); } if (tree) { |