Wireshark mailing list archives
Re: [Wireshark-commits] rev 53090: /trunk/ /trunk/asn1/acse/: acse.cnf packet-acse-template.c /trunk/asn1/cmip/: cmip.cnf packet-cmip-template.c /trunk/asn1/disp/: packet-disp-template.c /trunk/epan/dissectors/: ...
From: Guy Harris <guy () alum mit edu>
Date: Fri, 10 Jan 2014 12:09:31 -0800
On Jan 10, 2014, at 10:59 AM, Stig Bjørlykke <stig () bjorlykke org> wrote:
Updating the RTSE dissector to a new-style was done by returning tvb_length(tvb), which in this case is always 0. Returning 0 from a new-style dissector means this package was not for us, which is wrong in this case.
That's why I never converted all dissectors to new-style dissectors - having the return value both be an "is this a packet for my protocol?" indicator *and* a "length dissected in the tvbuff handed to me" indicator doesn't always work. Something better is needed. Perhaps handing a ptvcursor to the dissector, using the ptvcursor to handle the "how much was dissected?" part, and having the dissector return a gboolean indicating whether the packet was accepted or not would be better. (It would also let heuristic dissectors use the same signature.) ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] rev 53090: /trunk/ /trunk/asn1/acse/: acse.cnf packet-acse-template.c /trunk/asn1/cmip/: cmip.cnf packet-cmip-template.c /trunk/asn1/disp/: packet-disp-template.c /trunk/epan/dissectors/: ... Stig Bjørlykke (Jan 10)
- Re: [Wireshark-commits] rev 53090: /trunk/ /trunk/asn1/acse/: acse.cnf packet-acse-template.c /trunk/asn1/cmip/: cmip.cnf packet-cmip-template.c /trunk/asn1/disp/: packet-disp-template.c /trunk/epan/dissectors/: ... Stig Bjørlykke (Jan 10)
- Re: [Wireshark-commits] rev 53090: /trunk/ /trunk/asn1/acse/: acse.cnf packet-acse-template.c /trunk/asn1/cmip/: cmip.cnf packet-cmip-template.c /trunk/asn1/disp/: packet-disp-template.c /trunk/epan/dissectors/: ... Guy Harris (Jan 10)
- Re: [Wireshark-commits] rev 53090: /trunk/ /trunk/asn1/acse/: acse.cnf packet-acse-template.c /trunk/asn1/cmip/: cmip.cnf packet-cmip-template.c /trunk/asn1/disp/: packet-disp-template.c /trunk/epan/dissectors/: ... Stig Bjørlykke (Jan 10)