Wireshark-bugs: [Wireshark-bugs] [Bug 7241] Adding col_get_str
Date: Wed, 9 May 2012 11:16:26 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7241

--- Comment #3 from Michael Mann <mmann78@xxxxxxxxxxxx> 2012-05-09 11:16:25 PDT ---
(In reply to comment #2)
> Is there something that this does better than setting a fence?  Couldn't, in
> your example, the RTMP dissector just set a fence after each PDU has been fully
> dissected (all subdissectors, if any, called)?

I was unaware of the fence API (live and learn), but I think the col_get_str
API can answer the question "is this the first PDU in the packet?" (and is IMO
"cleaner" than the previous "trick" used by the RTMP dissector). 

col_set_fence() can prevent text from being overridden, but I don't see how it
could be used to effectively place "delimiters" between the PDUs of a single
packet (which is what the RTMP dissector is trying to do).  With
col_set_fence() you can place (and "lock") a delimiter at the end of PDU, but
if there is only 1 PDU, the delimiter isn't really necessary.  And if you have
only 1 PDU, you don't want to always prepend a delimiter at the start of
dissecting it.  Yes, its nitpicky, but that would be my justification for
col_get_str.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.