-
Notifications
You must be signed in to change notification settings - Fork 35
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
NFLOG support #38
Comments
Hi @vorner, in its current state, neli technically does support nflog at the socket level. If you do find out how nflog works, you could create your own structs that implement the |
Thank you for the hint with nfnetlink_log.h. I guess I hoped for somewhat better documentation about how the protocol works, but this might be the missing link. I'll try to reverse-engineer it from some C examples. The protocol is used to send copies of packets to userspace ‒ an iptables rule can be created and all applications connected to the relevant queue will get the packets to look at. |
I did also find this code. If you're familiar with Go, this might be helpful for reconstructing something in Rust. I would build support based on this code myself as I've written a fair amount of Go, but I have nothing I can really test it against as I don't know how nflog is used in Linux. If this helps you and you want to submit a PR, I'll gladly look it over. If you do, please also submit it with an example in the |
You could have just assigned the issue onto me, I'm working on this and I think I'm slowly getting somewhere. For now, I have code that's full of magic constants that'll have to be made into proper types and enums, but I'm reverse engineering the protocol slowly. As for testing, there's not much, really. Just doing |
I'll reopen and assign this to you. |
Support receiving packets from the kernel over nflog. Some parts are not yet implemented ‒ conntrack integration, hardware headers... Closes jbaublitz#38.
Support receiving packets from the kernel over nflog. Some parts are not yet implemented ‒ conntrack integration, hardware headers... Closes jbaublitz#38.
Support receiving packets from the kernel over nflog. Some parts are not yet implemented ‒ conntrack integration, hardware headers... Closes jbaublitz#38.
Hello
I'm searching for a nice library to use for reading network packets coming from NFLOG and came about this crate. How hard would it be to add support for that protocol?
I'm trying to read the libnl code. From a high level, I have the impression the protocol should be quite simple ‒ sending two control messages, then subscribing into a multicast group and then the packets should start appearing. However, I'm having trouble finding any documentation how the structure of such messages would look like and how it translates into neli code. If you'd give me few hints how you usually go about finding such information, I might try submitting the new message types as a PR.
Thank you
The text was updated successfully, but these errors were encountered: