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

How to cancel a pcap_sendqueue_transmit? #753

Open
kayoub5 opened this issue Oct 4, 2024 · 0 comments
Open

How to cancel a pcap_sendqueue_transmit? #753

kayoub5 opened this issue Oct 4, 2024 · 0 comments

Comments

@kayoub5
Copy link

kayoub5 commented Oct 4, 2024

Context

The API pcap_sendqueue_transmit allows for more or less accurate delta time between packets
We have an interactive application where user select a packet, and a bitrate, and the application burst send that packet with the specified bitrate.

This is helpful for load tests of application and embedded devices kernel performance.

In order to send the packet with the specified bitrate, we create a pcap sendqueue that lasts few seconds, with a small delta time between packets.

We offer another interface to user, where user can manually provide multiple packets, and delta time between them, especially helpful for timing attack.

The problem

  • Application is interactive, user may request to stop burst transmission at any moment
  • The function pcap_sendqueue_transmit have no API to cancel a queue once started
  • Using smaller queue was tried, but the jitter of multiple calls to pcap_sendqueue_transmit with the same small queue was too big.
  • If user accidentally provide a delta time between packets (for example an hour), they basically dead-lock the application, with no way to recover.

Expected behavior
We are welcome to any way that would allow canceling a pcap_sendqueue_transmit, but officially in the API docs of libpcap/npcap we can't call any function on the same pcap_t handle, while another function call is in progress.

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

No branches or pull requests

1 participant