Quote:
Originally Posted by novice_
What i want to do is that the kernel module is outputting data constantly. I want that data to be displayed to the user. The user can run a process which connects to the kernel module and displays what kernel module is outputting.
|
There is no necessity for "a user to run a process which connects to the kernel module" as output can be provided through /proc easily (for instance 'netstat' reading /proc/net/snmp).
Quote:
Originally Posted by novice_
i want the user to be able to send data/command to the kernel module to control its behavior.
|
Depends on what needs to be written. If it's like flipping a boolean (like /proc/sys/net/ipv4/ip_forward) then a sysctl key could do. Else, building on janoszen reply, see for instance how 'iptables' handles providing instructions to the Netfilter framework ('man 7 netlink',
http://people.redhat.com/nhorman/papers/netlink.pdf). BTW I'm no expert either ;-p