Wireshark mailing list archives
Best way to handle a variable-length NULL-terminated string in a tvb
From: "Jeremy O'Brien" <obrien654j () gmail com>
Date: Fri, 30 Apr 2010 15:33:52 -0400
So I have several strings in my protocol, which are separated by NULL's. There is no information contained in the packet that gives the length of each string. Is there a better way to add these strings to the protocol dissection besides doing a tvb_get_ephemeral_string() on the section of the tvb in question, searching for the ending NULL's for each string, and manually incrementing the offset for each one? I'm just not sure if wireshark has any convenience functions that would handle this sort of situation. Thanks! Jeremy ___________________________________________________________________________ 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:
- Best way to handle a variable-length NULL-terminated string in a tvb Jeremy O'Brien (Apr 30)
- Re: Best way to handle a variable-length NULL-terminated string in a tvb Guy Harris (Apr 30)