[EMAIL PROTECTED] wrote:
Hello all,
I'm writing a kernel module which intercepts incoming
IP packets and reads information from a custom header.
The information contained in "My header" is passed to
userspace via netlink. So userspace builds up a picture
of the current network state, neighbouring nodes etc.....

I've inserted this custom header at the hook NF_IP_LOCAL_OUT
in each outgoing IP packet.At the  moment I'm just populating
it with temporary data.

So my outgoing packets look like

[Mac hdr][IP hdr][My header][Data]

I'm wondering whats the best way for the kernel to communicate with userspace at the NF_IP_LOCAL_OUT hook so it can populate
[My header] with the latest information from userspace???

So i'm looking to do something like

1. Kernel at NF_IP_LOCAL_OUT, I've got a new packet!
2. Kernel -> Userspace what information should I put in [My Header]? 3.
Userspace -> Kernel Heres my current view of the network
4. Kernel Populates My header and returns NF_ACCEPT

ip_queue is meant for this, it passes the entire packet to userspace and
lets you reinject it after doing your modifications.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to