Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework commandline arguments handling
Use getopt implementation from MinGW runtime. Tested against Wireshark 2.0.16 and 2.9.0-1285. Everything works fine in the Wireshark Legacy (GTK+) interface in 2.0.16. In Wireshark 2.9.0-1285, an empty --devices parameter immadietely before --capture-from-all-devices can be triggered by doing: 1. Open Wireshark, select USBPcap interface, open options 2. Expand any parent USB device, click on child device name 3. Start capture 4. Click Stop capture button in the toolbar 5. Click Start capture button in toolbar, continue without saving data 6. Watch that no packets are being captured In point 5 USBPcapCMD is executed with following parameters: USBPcapCMD.exe -d \\.\USBPcap3 -b 1048576 -o \\.\pipe\wireshark_extcap_\\.\USBPcap3_20180728132117 --devices --capture-from-all-devices --capture-from-new-devices 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: -." While it would be nice to implement extcap control message passing to display this error in Wireshark status bar, it is not done yet.
- Loading branch information