Wireshark mailing list archives

Re: [Wireshark-commits] rev 35393: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-catapult-dct2000.c


From: Martin Mathieson <martin.r.mathieson () googlemail com>
Date: Thu, 6 Jan 2011 09:14:21 +0000

Jeff,
I made the change to use tvb_get_ptr() because a profile showed that getting
the strings each time was quite slow.
The reason I thought this is safe is that this protocol is really a header
written out by the corresponding wiretap module, so it should be well-formed
(if the file being read isn't well-formed that will be rejected by the
wiretap module).

I can't remember how much slower it was, but it gets done several times for
each frame read from the file.

Best regards,
Martin

On Thu, Jan 6, 2011 at 2:18 AM, <morriss () wireshark org> wrote:

http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=35393

User: morriss
Date: 2011/01/05 06:18 PM

Log:
 Use tvb_get_ephemeral_stringz() instead of tvb_get_strsize() plus
(sometimes multiple) calls to tvb_get_ptr().

Directory: /trunk/epan/dissectors/
 Changes    Path                         Action
 +24 -30    packet-catapult-dct2000.c    Modified

___________________________________________________________________________
Sent via:    Wireshark-commits mailing list <
wireshark-commits () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-commits
Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
            mailto:wireshark-commits-request () wireshark org
?subject=unsubscribe

___________________________________________________________________________
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: