Re: communication between userspace and kernelspace

2009-04-17 Thread Thierry
Hi, If you try the netlink approach, maybe this link can help (there are just few changements to do, because of kernel update): http://www.linuxjournal.com/article/7356 I am currently trying to make broadcast_send (I have some trouble, ie the other thread), but for unicast_send it works quite good

Re: communication between userspace and kernelspace

2009-04-16 Thread niranjan puram
thank you guys for your prompt replies. I am not able to map the module name to the kernel src file. I looked in the build and /lib/modules directories but could not find a direct mapping from the src to the module file. Plus the variable i want to change is the one that i have declared in the sou

Re: communication between userspace and kernelspace

2009-04-16 Thread Greg Freemyer
On Thu, Apr 16, 2009 at 1:56 AM, niranjan puram wrote: > No heavy data transfer, I just want to set variables dynamically from > the user space. So i think declaring a kernel module parameter and > changing it through the /proc file system should solve the problem. > Also this is the first time I

Re: communication between userspace and kernelspace

2009-04-16 Thread pradeep singh
On Thu, Apr 16, 2009 at 10:26 AM, niranjan puram wrote: > Hello all, >     I need to set some variables defined in a kernel driver from the > user space. Is there a clean simple way to do that? I thought of the > following methods: socket connection, RPC ,etc. but was not able to > find enough doc

Re: communication between userspace and kernelspace

2009-04-16 Thread niamathullah sharief
"ioctl()" is used to call the kernel function from user space...so i might be correct one for you...I am not sure --- On Thu, 16/4/09, niranjan puram wrote: From: niranjan puram Subject: communication between userspace and kernelspace To: kernelnewbies@nl.linux.org Date: Thursday

Re: Re: communication between userspace and kernelspace

2009-04-16 Thread Rahul Tank
And there is debugfs which u can always use :) -- Rahul 2009/4/16 figure1802 > you can try to use IOCTL > > > 在2009-04-16 13:56:21,"niranjan puram" 写道: > >No heavy data transfer, I just want to set variables dynamically from > >the user space. So i think declaring a kernel module parameter an

Re:Re: communication between userspace and kernelspace

2009-04-15 Thread figure1802
you can try to use IOCTL 在2009-04-16?13:56:21,"niranjan?puram"??写道: >No?heavy?data?transfer,?I?just?want?to?set?variables?dynamically?from >the?user?space.?So?i?think?declaring?a?kernel?module?parameter?and >changing?it?through?the?/proc?file?system?should?solve?the?problem. >Also?this?is?the?f

Re: communication between userspace and kernelspace

2009-04-15 Thread Prashant Bhole
You can use sysfs. You can just cat the data in a file in sysfs and set a variable in your module! The other way is to register a character driver with open, release, ioctl operations and use ioctl interface to control your driver. On Thu, Apr 16, 2009 at 10:26 AM, niranjan puram < puram.niranjan.

Re: communication between userspace and kernelspace

2009-04-15 Thread niranjan puram
No heavy data transfer, I just want to set variables dynamically from the user space. So i think declaring a kernel module parameter and changing it through the /proc file system should solve the problem. Also this is the first time I am programming in kernel :) so please bear with me. Is there an

Re: communication between userspace and kernelspace

2009-04-15 Thread sandeep lahane
On Thu, Apr 16, 2009 at 10:47 AM, Ramesh wrote: > You could use netlink sockets > > On Wed, Apr 15, 2009 at 9:56 PM, niranjan puram > wrote: >> Hello all, >>     I need to set some variables defined in a kernel driver from the >> user space. Is there a clean simple way to do that? I thought of th

Re: communication between userspace and kernelspace

2009-04-15 Thread Ramesh
You could use netlink sockets On Wed, Apr 15, 2009 at 9:56 PM, niranjan puram wrote: > Hello all, >     I need to set some variables defined in a kernel driver from the > user space. Is there a clean simple way to do that? I thought of the > following methods: socket connection, RPC ,etc. but was

Re: communication between userspace and kernelspace

2009-04-15 Thread Guo Hongruan
You can define a kernel module parameter and change it through /proc filesystem from userspace. Or you can use sysctl. There are lots of examples in linux kernel. On Thu, 16 Apr 2009 12:56:59 +0800, niranjan puram wrote: Hello all, I need to set some variables defined in a kernel

communication between userspace and kernelspace

2009-04-15 Thread niranjan puram
Hello all, I need to set some variables defined in a kernel driver from the user space. Is there a clean simple way to do that? I thought of the following methods: socket connection, RPC ,etc. but was not able to find enough documentation regarding the same. Please help me, its urgent. Thanks