Subject: Userland -> Kernel communication

Hello!

I wish to give me some pointers to how to communicate with a kernel module
from userland.
May I use sockets?

Thanks in advance!

---
Catalin(ux) BOIE
[email protected]
A new Linux distribution: http://l13plus.deuroconsult.ro
http://www2.deuroconsult.ro/~catab


2000-11-08 13:10:37

by Klaus Naumann

[permalink] [raw]
Subject: Re: Userland -> Kernel communication

Catalin BOIE wrote:
>
> Hello!
>
> I wish to give me some pointers to how to communicate with a kernel module
> from userland.

You can use the /proc interface or a device file
(in /dev) depending on what type of comunication you need.
These are the most common ways, not sure if there are more.

> May I use sockets?

I don't think so.

HTH, Klaus

--
Klaus Naumann (mailto:[email protected])
http://www.mgnet.de/
Phone: ++49/8761727852

2000-11-08 14:14:19

by aprasad

[permalink] [raw]
Subject: Re: Userland -> Kernel communication


>I wish to give me some pointers to how to communicate with a kernel module
>from userland.
>May I use sockets?

You can use copy_to/from_user functions present in kernel space, provided
you have valid userland pointers
also put_user/get_user for single datum transfer.

regards
Anil