Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade wireshark support from 4.0 to 4.4 #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seffradev
Copy link

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.

  • tvb_get_guintX-support
  • tvb_get_gintX-support

@amitrahman1026
Copy link

@seffradev Hi, are you still working on this? I'm looking into upgrading to 4.4.1 myself

@seffradev
Copy link
Author

Hi @amitrahman1026, no I'm not really looking into it anymore due to realizing that wsdf wasn't sufficient for my needs and I didn't have time to specify exactly what I needed due to it being just an experiment for a work thing.

Another thing I realized was that technically we shouldn't have to manually update to Wireshark 4.4 and instead wsdf aims to (but I couldn't get it to work) generate the FFI files required by Rust to compile wsdf based on the Wireshark development files you have installed locally.

So to get 4.4 support, I'd recommend looking into possibly getting the wsdf crate to generate the files from your install, the thing I failed at, and then it either works automatically when you write your wsdf-based code or only minor tweaks and not a large-esque PR like this is necessary.

@amitrahman1026
Copy link

amitrahman1026 commented Oct 24, 2024

Thanks for the context. I've pulled some of your changes into my branch as well as a base to work off. I'll see if I can make a difference :)

@seffradev
Copy link
Author

seffradev commented Oct 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants