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

Add USB packet capture #242

Merged
merged 3 commits into from
Mar 22, 2022
Merged

Add USB packet capture #242

merged 3 commits into from
Mar 22, 2022

Conversation

dorssel
Copy link
Owner

@dorssel dorssel commented Feb 1, 2022

No description provided.

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #242 (14c7a51) into master (00c08d8) will increase coverage by 7.34%.
The diff coverage is 90.06%.

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage   32.69%   40.03%   +7.34%     
==========================================
  Files          27       28       +1     
  Lines        2083     2358     +275     
==========================================
+ Hits          681      944     +263     
- Misses       1402     1414      +12     
Impacted Files Coverage Δ
UsbIpServer/AttachedClient.cs 0.00% <0.00%> (ø)
UsbIpServer/CommandHandlers.cs 0.00% <ø> (ø)
UsbIpServer/ConnectedClient.cs 0.00% <ø> (ø)
UsbIpServer/Server.cs 0.00% <0.00%> (ø)
UsbIpServer/PcapNg.cs 94.46% <94.46%> (ø)
UsbIpServer/Tools.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00c08d8...14c7a51. Read the comment docs.

@vmarrazz
Copy link

vmarrazz commented Feb 28, 2022

Hi @dorssel
I have found usbipd a powerful tool for my testing activity for a device connected via "USB to serial" converter.

I have some question on this feature/PR:

  • Where is possible to find a description of this feature/PR?
  • Does it allow to capture messages exchanged without any interference with application running into WSL2?

Regards
Vincenzo

@dorssel
Copy link
Owner Author

dorssel commented Feb 28, 2022

@vmarrazz

  • No description yet. This PR is still in draft and probably not functional. It doesn't even have the latest commits due to lack of time.
  • Yes, it eventually will.

For the time being, you can achieve (nearly) the same by using tcpdump or tshark on /dev/usbmon on the Linux side of things, but for WSL that would mean compiling your own kernel with support for usbmon.

@vmarrazz
Copy link

@dorssel thanks for feedback
Do you have a guide to compile kernel specific for WSL2?

Regards

@dorssel
Copy link
Owner Author

dorssel commented Feb 28, 2022

@vmarrazz
Other than https://github.com/dorssel/usbipd-win/wiki/WSL-support? No. You probably will have to enable some CONFIG_XXX referring to usbmon, but I have no clue which one.

@vmarrazz
Copy link

vmarrazz commented Mar 4, 2022

Thank you @dorssel

The WSL-support link provide me all necessary information to compile kernel for WSL.
Other information I need was related usbmon capture but Wireshark/tshark has many wiki about it ;-)

Regards

@dorssel dorssel marked this pull request as ready for review March 22, 2022 16:21
@dorssel dorssel merged commit f448127 into master Mar 22, 2022
@dorssel dorssel deleted the pcapng branch March 22, 2022 16:50
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