kernel to userspace communication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Anyways I would be happy to hear any ideas your have, :-)

Thanks,
Kevin





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux