Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-aim.c packet-bootp.c packet-bxxp.c pa
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jan 2001 02:03:51 -0600 (CST)
guy 2001/01/22 02:03:51 CST Modified files: . packet-aim.c packet-bootp.c packet-bxxp.c packet-clnp.c packet-cops.c packet-ddtp.c packet-dns.c packet-esis.c packet-ftp.c packet-giop.c packet-h1.c packet-icp.c packet-imap.c packet-lpd.c packet-nbns.c packet-nntp.c packet-ntp.c packet-pop.c packet-pptp.c packet-quake.c packet-rip.c packet-ripng.c packet-rlogin.c packet-rpc.c packet-rpc.h packet-rsh.c packet-rsvp.c packet-wccp.c packet-who.c packet-wsp.c packet-wtp.c packet-x11.c packet-xot.c packet-zebra.c Log: Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto =" statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. Don't use col_add_fstr(..., "%s", string); Use col_add_str(..., string); as it does the same thing, but doesn't drag all the heavy *printf machinery in. Fix the DDTP dissector to set the Info column regardless of whether we're building a protocol tree or not, and to set it to "Encrypted payload" if the payload is encrypted. Also fix a typo in a field name. Register the FTP data dissector as being associated with the FTP data protocol, not the FTP protocol (the removed "CHECK_DISPLAY_AS_DATA()" call checked "proto_ftp_data", and the removed "pinfo->current_proto =" line set it to "FTP-DATA", so it should be associated with "proto_ftp_data"). Make the H1 dissector check whether the frame has at least 2 bytes in it before checking the first two bytes; heuristic dissectors must not throw exceptions until they've accepted the packet as one of theirs. Use "tvb_format_text()" rather than "tvb_get_ptr()" and "format_text()" in some dissectors where the result of "tvb_get_ptr()" is used only in the "format_text()" call. In the Quake dissector, don't check whether there are at least 4 bytes in the packet - if we return, the packet won't be dissected at all (it's not as if some other dissector will get to handle it), and, if we don't return, we'll throw an exception if there aren't at least 4 bytes in the packet, so the packet will be marked as short or malformed, as appropriate. In the RIPng dissector, associate the table of strings for the command field with the command field, so that the dissector doesn't have to format the string for the protocol tree entry itself, and so that the filter construction dialog box can let you select "Request" or "Response" from a list rather than requiring you to know the values for "Request" and "Response". Make "dissect_rpc()" static, as it's called only through a heuristic dissector list. Use "col_set_str()" to set the COL_PROTOCOL column for RPC protocols; the string used is from a table provided by the dissector, and is a string constant. Don't format the Info column for WSP into a buffer and then format that buffer into the column with "%s" - "col_add_fstr()" can do the formatting for you, without having to allocate your own buffer (or run through the *printf machinery twice). Don't fetch fields from the WTP packet until you're ready to use them, so that you don't throw an exception before you even set the Protocol column or clear the Info column. Use "pinfo->destport", not "pi.destport", in the Zebra dissector when checking whether the packet is a request or reply, and do the check by comparing with "pinfo->match_port" rather than TCP_PORT_ZEBRA (so that if the dissector is ever registered on another port, it still correctly determines whether the packet is a request or reply - the Network Monitor HTTP dissector has port 80 wired into its brain, which is a bit irritating if you're trying to get it to dissect HTTP proxy traffic on port 3128 or proxy administration UI traffic on port 3132). Revision Changes Path 1.7 +1 -9 ethereal/packet-aim.c 1.46 +1 -5 ethereal/packet-bootp.c 1.16 +4 -6 ethereal/packet-bxxp.c 1.24 +3 -5 ethereal/packet-clnp.c 1.11 +3 -4 ethereal/packet-cops.c 1.15 +47 -32 ethereal/packet-ddtp.c 1.62 +3 -3 ethereal/packet-dns.c 1.13 +3 -5 ethereal/packet-esis.c 1.27 +7 -11 ethereal/packet-ftp.c 1.30 +9 -13 ethereal/packet-giop.c 1.18 +7 -5 ethereal/packet-h1.c 1.16 +5 -5 ethereal/packet-icp.c 1.14 +5 -5 ethereal/packet-imap.c 1.27 +1 -5 ethereal/packet-lpd.c 1.51 +12 -12 ethereal/packet-nbns.c 1.19 +6 -8 ethereal/packet-nntp.c 1.25 +1 -5 ethereal/packet-ntp.c 1.24 +5 -5 ethereal/packet-pop.c 1.18 +1 -5 ethereal/packet-pptp.c 1.13 +5 -9 ethereal/packet-quake.c 1.23 +5 -4 ethereal/packet-rip.c 1.18 +19 -16 ethereal/packet-ripng.c 1.14 +2 -3 ethereal/packet-rlogin.c 1.50 +6 -10 ethereal/packet-rpc.c 1.22 +1 -2 ethereal/packet-rpc.h 1.10 +11 -8 ethereal/packet-rsh.c 1.33 +8 -10 ethereal/packet-rsvp.c 1.17 +4 -5 ethereal/packet-wccp.c 1.15 +1 -5 ethereal/packet-who.c 1.12 +6 -10 ethereal/packet-wsp.c 1.10 +14 -10 ethereal/packet-wtp.c 1.16 +4 -13 ethereal/packet-x11.c 1.4 +4 -5 ethereal/packet-xot.c 1.9 +2 -6 ethereal/packet-zebra.c
- Prev by Date: [Ethereal-cvs] cvs commit: ethereal packet-portmap.c
- Next by Date: [Ethereal-cvs] cvs commit: ethereal packet-http.c packet-icmpv6.c packet-radius.c packet-srvloc.c
- Previous by thread: [Ethereal-cvs] cvs commit: ethereal packet-portmap.c
- Next by thread: [Ethereal-cvs] cvs commit: ethereal packet-http.c packet-icmpv6.c packet-radius.c packet-srvloc.c
- Index(es):