Re: Dissecting with variable length fields
Kees Cook <[email protected]>
| Newsgroups | gmane.network.ethereal.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 26, 2006 at 03:31:58PM -0700, Stephen Fisher wrote: > I am writing a new dissector for the exec/rexec protocol and am new to > Ethereal development. What is the best way to dissect a protocol whose > fields are variable length null terminated strings? tvb_get_stringz() works great for this. See doc/README.developer: guint8 *tvb_get_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); -- Kees Cook @outflux.net