On Wed, Jul 30, 2003 at 12:45:39AM -0700, Guy Harris wrote:
> On Tue, Jul 29, 2003 at 03:13:06PM -0700, Guy Harris wrote:
> > 3) I got rid of the "(last)" in the names of Segmented Invoke and
> > Segmented Reply (I'm not sure those are guaranteed to be the last
> > ones).
>
> At least as I read section 8.14 of WAP-201-WTP Approved Version
> 19-February-2000, a segmented PDU is sent out as:
WAP-224-WTP-20010710-a is the same.
> That suggests that the last one is the one with TTR set, and that the
> others shouldn't be marked as "(last)".
Correct.
This is a more abstract view of the dissect_wtp_common function
bottom:
if ((PDU in SEGMENTED* || (PDU in RESULT|INVOKE && !TTR) &&
bytes_exist) {
add_to_fragment_buffer
if (fragment_complete)
call_dissector
} else {
if (PDU not in SEGMENTED* || psn==0)
call_dissector <-- 2nd call
else
write_col_info
}
The previous mistake in the code was, that the WSP dissector
was called on fragments. I tried to avoid this by putting
a condition before it. Adding psn==0 as an alternative
reason to call the dissector was because I was unsure if
a PSN==0 could exist in any handsets.
Setting the (last) attribute only worked on my incomplete
packets (because the upper if part was always skipped on
all but the last packet), and because by random the last
packet happened to meet the "bytes_exist"-rule.
"(Last)" *could* be set on the TTR-flag being set in Segmented
Invokes / Results.
Regards,
Georg