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

Other modes of use than just run_loop #11

Open
vorner opened this issue Dec 8, 2017 · 1 comment
Open

Other modes of use than just run_loop #11

vorner opened this issue Dec 8, 2017 · 1 comment

Comments

@vorner
Copy link
Contributor

vorner commented Dec 8, 2017

The run_loop mode has two disadvantages.

• It is not possible to multiplex more than one queue on the same thread.
• There doesn't seem to be a clean way to terminate.

The C library supports other mode ‒ you can get the file descriptor, put it into epoll (or something similar) and when it is ready, try recvmsg on it. Then you call nfq_handle_packet on it and it calls the callback internally. This is more flexible (though slightly more work). Would it be possible to expose this mode of API as well?

@sharksforarms
Copy link

I agree, I need this flexibility as well. My use case is to re-order packets (delay the verdict)

What you described is what the library is doing under the hood, recv then nfq_handle_packet

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

2 participants