[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sending data between kernel module and user process
On Mon, Aug 06, 2001 at 12:19:49AM +0000, lam wai wm wrote:
> Hi all,
>
> I have created a kernel module which hook the netfilter, and
> I'd like a user process to communicate with that module(Sending
> data between). Can I use the netlink socket to do that? If
> not, what can I do. Please give some advice to me.
If you want a user process to communicate with part of the kernel, the simplest
and often best way is to create a misc. char device, and use read(2) and write(2)
alternatively, you might find sysctl() a good solution depending on what you need
to write.
other "less-approved" methods are using procfs or ioctl.
Check the available docs
john, who's thinking this question needs adding to the FAQ
--
"They didn't know what the symbols and paradoxes meant. Instead of following
the finger that points to the moon, they sat down and worshipped the finger
itself. Instead of following the map, they thought it was the territory and
tried to live in it. Instead of reading the menu they tried to eat it. Dig ?"
- Miss Portinari
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/