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

Fix delays in pcap implementation #21

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Fix delays in pcap implementation #21

merged 1 commit into from
Nov 19, 2024

Conversation

jethrogb
Copy link
Member

The previous implementation had several issues:

  • pcap-async relied on a blocking function (smol::unblock) internally making it not really async
    • I also noticed packet processing delays related to the buffer_for Duration, not sure if this was related or not.
  • Blocking MPSC channels were used in async code

These are fixed by switching to the pcap crate which has since gotten its own async implementation. I also added an async implementation for the other direction.

Depends on rust-pcap/pcap#372 and rust-pcap/pcap#373

@raoulstrackx raoulstrackx added this pull request to the merge queue Nov 19, 2024
Merged via the queue into master with commit 5ba09c9 Nov 19, 2024
1 check passed
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