I am trying to write a tap for TCP with access to Wireshark's analysis (such as which frame the current packet is acknowledging. It seems relatively straight forward to do this in Lua with something like:
However I have not worked out how to do this in a tap written in C/C++. From what I understand, I have access to the following information in a TCP tap:
None of these seems to have the TCP analysis information available in the Lua tap. How can I access Wireshark's TCP analysis from a tap listener written in C? asked 23 Jul '14, 16:29 wainwright |
One Answer:
In order to access these fields you must ask for them by creating a tap filter when calling For example, to ask for
which you would pass as the 3rd argument to If the tap is registered with the filter, the data can be found in the protocol tree provided in the Note that this requires you to have a filter (performance hit) even if you are willing to receive all packets. There may be a better way where you can request that those fields are filled, without having to filter packets, but I am not aware of it. This answer is marked "community wiki". answered 27 Jul '14, 16:58 wainwright edited 27 Jul '14, 17:04 |