sending event to user space
Hi list!
I programmed a dummy module for netfilter which tries to match a packet and if it does, it will do nothing (NF_ACCEPT) but I would want it to send an event to a program in user space to do something, how can I do that?
So something like:
a) packet gets my hook and do NF_ACCEPT.
b) modules sends an event to user space.
c) program in user space does something.
Thanks!
Pablo
P.S: thanks for this great piece of code!!
Quoted 5 lines · pablo neira
Hi list!
I programmed a dummy module for netfilter which tries to match a packet and if it does, it will do nothing (
NF_ACCEPT) but I would want it to send an event to a program in user space to do something, how can I do that?
That is not really netfilter related at all. You could create a /proc file and write something to it, you could use netlink sockets, you could use any means that the kernel provides for communication with userspace processes...
Quoted 2 lines
Thanks!
Pablo
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie