Wireshark mailing list archives
Re: Converting to new proto tree too complex/errorprone
From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Sat, 21 Dec 2013 13:09:28 +0100
Hello, On Sat, Dec 21, 2013 at 11:27:27AM +0100, Joerg Mayer wrote:
converting a dissector to the new proto tree api is still unnecessarily complex (and I managed to break all buildbots in the course). I've attached a diff between the result of the conversion script output and the currently committed source. Can you please take a look whether at least some of this can be improved (if the script had been in perl I'd probably would have tried to fix some of these things myself).
It might be possible to replace proto_peekremote / add NEW_PROTO_TREE_API define before config.h include. Still if we're no longer forced to have header_field_info in register routine, I was thinking we could put hfi just before use. You can check sample in packet-netlink-sock_diag.c, which I base on packet-mpeg-descriptor.c Also Peter suggested some modification to create HFI_REG_VAR macro[1]. btw. recently I have been doing some research if it's possible to do this kind of optimization using clang/ gcc plugins. Right now I have no code. [1] https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9498#c16 ___________________________________________________________________________ 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:
- Converting to new proto tree too complex/errorprone Joerg Mayer (Dec 21)
- Re: Converting to new proto tree too complex/errorprone Jakub Zawadzki (Dec 21)