[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: accessing my modules functions from userspace
Kim Schulz wrote:
>hi
>I have recently started to create a realtime ARCnet protocol and
>implement it as a linux kernel module. Sofar it works fine, can be
>loadet and my testapp (another module) works fine to.
>Now I want to make the functionality available to a program in
>userspace. I have functions like bind,connect, recieve and send (ofcause
>with non-conflicting names) and these are in a module of it's own.
>I thought that I by including the headerfile for the module in my
>userspace app, then I could access them that way (the functions are
>declared as extern). However I found out that this is not the case.
>So what should I do now? how do I access my module from userspace?
>
Userspace applications can call kernel code via system calls. If u want
to provide some new functionality to
userspace applications, you will need to declare the functions that you
have written(bind, connect, recieve...) as system calls, and compile
the same into the kernel
moreover, why do u need to implement a new protocol in this way?
cant you define a hook for the new protocol (unique protocol number)
and use the existing socket calls?
>
>Best regards and thanx
>Kim Schulz,
>Department of Control engineering,
>University of Aalborg,
>Denmark
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive: http://mail.nl.linux.org/kernelnewbies/
>FAQ: http://kernelnewbies.org/faq/
>
>
>
>
>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/