ghpr-asia / wsdf

Wireshark Dissector Framework
Apache License 2.0
16 stars 9 forks source link

chore: upgrade wireshark support from 4.0 to 4.4 #19

Open seffradev opened 1 week ago

seffradev commented 1 week ago

It looks like the developers of Wireshark decided to deprecate the tvb_get_guintX and tvb_get_gintX-methods (and more) in Wireshark 4.4, which is what I run on my setup. This aims to make the crate compatible with Wireshark 4.4, though I'm uncertain how compatible it is with older Wireshark versions.

I have tested so that it works on Wireshark 4.4 but I have not tested on earlier versions. I also did a very simple change and didn't regenerate the bindings, just some sed-magic to change the functions. There may be other functions deprecated that will be unsupported.

The reason is simply that when I ran a compiled dissector that used u32s, e.g. as a len_field for a Vec<u8>, it couldn't find said function due to linking to another version.

The functions are still visible in the Wireshark source, but I imagine the inlining makes them disappear when it's compiled so they allow the old interface until they can remove it in a future version.

I would assume the changes to the *.stderr-files are due to me running Rust nightly or being generated with at least a somewhat newer version than when they were created.