LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   accessing functions in kernel modules (https://www.linuxquestions.org/questions/programming-9/accessing-functions-in-kernel-modules-265975/)

starbuck8968 12-13-2004 12:54 PM

accessing functions in kernel modules
 
Hi, I've written a module that has some kernel space functions that I'd like to acces using a user space program. Anyone have any experience doing this? I've tried using EXPORT_SYMBOL and extern but that doesn't work, actually I don't think this is how its done anyways. The module sets some parameter that I'd like to control using the program.

Thanks in advance

m00t00 12-13-2004 02:41 PM

short answer, you dont. you can use a device file or something in /proc though.

starbuck8968 12-13-2004 04:25 PM

Quote:

Originally posted by m00t00
short answer, you dont. you can use a device file or something in /proc though.
Ok then, would you have any pointers for doing this via /proc or device file? I think /proc would probably be better, what I'm interested in is changing a parameter to invoke a kernel space function that would apply that parameter.

shy 12-14-2004 12:39 AM

Have you read this great book? Try it, I think it can help.

mayur 12-14-2004 05:46 AM

use open(),write(),read() system call

m00t00 12-14-2004 09:42 AM

Quote:

Originally posted by mayur
use open(),write(),read() system call
uh... no.
theyre not ordinary files.
check here , theres a chapter or two on it (chapters 5-7)


All times are GMT -5. The time now is 07:14 PM.