-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Wireshark integration: support new extcap option "--extcap-version=x.x" #51
Comments
Before there is a new release, one might want to use the latest AppVeyor build of USBPcapCMD (x64 only; Windows 10 warns about lack of signature - but works). |
For what it's worth, this also works on my (Win10 x64) machine with the master branch of Wireshark 2.9 |
Conversation moved from Pull Request @guyharris wrote:
To which I have replied: I will change the argument parser to support the optional argument. However, I am somehow lost in understanding --extcap-version. Could you please answer following questions to clarify: When Wireshark calls --extcap-version=X.Y then the X.Y is the Wireshark version, eg. 2.9, right? Is this "should presumably check whether it supports that version and fail if it doesn't" supposed to check if the wireshark version is too old? For example, assume that some extcap makes it mandatory to use some extcap feature that is supported in Wireshark since some version A.B. Then the extcap will check the passed X.Y against the A.B and if it is lower, it'll fail. Is this the intention? And if extcap is called without --extcap-version at all, but with the --extcap-interfaces (old version of Wireshark), is it safe to print the "extcap {version=a.b.c.d}{help=someurl}" alongside the interfaces? |
My understanding is that --extcap-version parameter is used to indicate the Wireshark version launching the extcap tool (in case the extcap tool has a dynamic behavior depending on the Wireshark version used because of new or changed features for example). |
Prior to Wireshark 2.9/3.0, the
Starting in 2.9/3.0, it can optionally take an argument. If no argument is specified, it still means "report the version of the extcap program"; if an argument is specified, it means "this is the version of the Wireshark/TShark/etc. that's running the extcap program". I think it was perhaps unwise to repurpose an existing option for a separate purpose, so I may just change it so that |
@guyharris Could you please review the #54 ? I have implemented the --extcap-version with optional argument, alongside some refactoring. What I have noticed is that the multicheck doesn't seem to work as I would expect. Is the multicheck implemented in Qt GUI? I remember this multicheck was working in GTK+ interface, but that was long time ago. Is it possible to inform Wireshark that the multicheck argument should be present on commandline only if there is argument to be passed alongside it? |
|
In Wireshark 2.9.0-1285, an empty --devices parameter immadietely before --capture-from-all-devices can be triggered by doing:
This makes getopt to consider --capture-from-all-devices as a parameter to --devices and thus USBPcapCMD fails with the: "Malformed address list. Invalid character: -." I will take a look into fixing the multicheck in Wireshark Qt interface. |
Well, the Wireshark Qt interface doesn't seem to be broken. In fact it does the "select by highlighting" which is confusing to me (press CTRL and click to select multiple ones). I would prefer if it displayed the tickboxes like the GTK+ interface did.
The problem I listed in previous comment is really related to a corner case where extcap does give multicheck, but then all the options are not selectable. EDIT: The code in USBPcapCMD is not really clean and I got confused a lot. In fact there are the correct entries with {enabled=true} so it is mostly a UI usability issue - Displaying empty checkbox next to option that is selectable would in my opinion make it significantly easier to realize which options are possible to be selected. |
Kudos to whoever wrote the multicheck in Wireshark Qt interface. It really does work correctly. The only issue I see is related to the fact that it's select by highlighting, which is especially confusing in the USBPcap context where you usually have much more non-selectable items (logical driver objects) than the selectable ones (representing actual USB interface). |
USBPcap 1.2.0.4 is now officially released. |
The latest build version of Wireshark (2.9.0) contains a change to the extcap API which breaks compatabiliy with usbpcap.
Until now, USBPcapCMD.exe was queried for it's extcap interfaces using:
"USBPcapCMD.exe --extcap-interfaces"
But from version 2.9 it will change to:
"USBPcapCMD.exe --extcap-interfaces --extcap-version=2.9"
Currently running USBPcapCmd.exe with these args returns this error:
"USBPcapCMD.exe: --extcap-version: unknown option"
This leads to wireshark rejecting the executable and not allowing capturing using it's GUI.
The text was updated successfully, but these errors were encountered: