-
Notifications
You must be signed in to change notification settings - Fork 0
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
WinDivertRcvSndCtx required while sending packet. #2
Comments
The In your case, you will need to:
|
Let's see scenario 1:
Questions:
Let's see scenario 2:
Which of the two scenarios would you recommend? |
I would recommend scenario 2, the model would be much simpler, and performance would be better since the buffers could be reused. For scenario 1:
Also please note that the driver copies each packet to all matched windivert handles, so you would have to manually distribute packets to each threads. It would be much more simple to use and more performant if windivert could support bitwise operators or hash functions. |
Maybe some PRs would be helpful, however I believe windivert is not meant for high performance packet processing, but a convenient tool for some lightweight network handling. |
Hi I'm trying to read a lot of packets to a queue and then sending them one by one based on certain conditions / modifications.
However we do require a context while sending the packet. What would be the best way to achieve this?
Should I create a new context for each recv call? This would preserve the context for sending but this would generate a lot of garbage.
Or should I re use the same context for all send / receive calls. Would this cause problems? Since I'll have a few consumer threads for reading and a separate one for dispatching.
The text was updated successfully, but these errors were encountered: