I want to stop the dissection of the packet when tvb buffer ends. Is there any API for stop the dissection of that packet?????? asked 01 Nov '12, 22:49 Akhil |
One Answer:
If you don't want to keep track of when the buffer ends (which you can detect by looking at the TVB length(s) as Anders said), you can also just keep reading/dissecting: when you get past the end of the buffer your access with throw an exception and stop dissection for you (of course it will also report your packet as malformed or cut short during capture). answered 02 Nov '12, 09:30 JeffMorriss ♦ I am checking the end of the buffer by if(tvb_length_remaining()<=0). If the condition is true which api/function should i call to stop the dissection?????. If i call exit(1) then i guess whireshark will terminate....I want to stop the dissection of that particular packet. (04 Nov '12, 21:52) Akhil just 'return' from your dissector. (05 Nov '12, 00:43) Kurt Knochner ♦ Thanks a lot Kurt (05 Nov '12, 00:48) Akhil |
What do you mean? The "normal" thing is that the dissector keeps track of how many bytes that should be dissected either from length information in the protocol or by checking the (reported) length of the tvb.