How to call module's functions?

How to call module's functions?

Post by Ivan Martine » Wed, 15 Mar 2000 04:00:00



        Hello.
        I can program and install kernel modules, but I don't know how to call
their functions from user programs. Could you tell me roughly how to do
it, or address me to on-line info about that?. Thank you.
--
Ivan Martinez (Rodriguez)
Bch in Computer Science - MSc student
http://www.student.dtu.dk/~u990873
"Got fabes?"
 
 
 

How to call module's functions?

Post by Paul D. Boy » Wed, 15 Mar 2000 04:00:00


: I can program and install kernel modules, but I don't know how to call
: their functions from user programs. Could you tell me roughly how to do
: it, or address me to on-line info about that?. Thank you.

You do not say what OS with which you are working, nor do you say what
kind of device the module drives (char, block, network?).  Taking a wild
guess, I would say Linux.

You could post to comp.os.linux.development.{system|apps}, or you can look
at the source for the module and see what methods have been implemented
for the driver.

Assuming for a second, that you are interested in a character device, most
character devices under Linux support open(), close(), read(), write().
The driver may also support ioctl() for various operations which do
not fit into the above.  If you have your device "created" using mknod,
you can use the standard open(2), close(2), etc on the the device file
in the /dev directory like you would with any low level file i/o.

Good Luck,

Paul

--
Paul D. Boyle

North Carolina State University
http://laue.chem.ncsu.edu/web/xray.welcome.html

 
 
 

How to call module's functions?

Post by Andrew Gabri » Thu, 16 Mar 2000 04:00:00




Quote:>    Hello.
>    I can program and install kernel modules, but I don't know how to call
> their functions from user programs. Could you tell me roughly how to do
> it, or address me to on-line info about that?. Thank you.

You access the modules through a device driver interface or system call
interface or as a filesystem (or possibly other ways I can't think of
just now), depending on how the module was designed into the system.

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

1. How to call kernel module's functions

        Hello all,
        I know how to program and install a kernel module, but I don't know how
to call its functions from user space. Also I don't know if such
functions should be declared in a special way in the module. Could
anybody point me to documentation about that, or give me an example, or
explain it?. (Answers like "you have to use the calling interface."
won't help). Many thanks.
--
Ivan Martinez (Rodriguez)
BEng in Software Engineering - MEng student
http://www.student.dtu.dk/~u990873
"Got fabes?"

2. mergemaster question

3. how to know the instruction address of calling function within called function?

4. Understanding vmalloc trace...

5. Browser calls CGI C function which sets an env var and call a c function crashes

6. HELP: newbie routing questions.

7. 2.5.39, SMP, pre-empt: snd_ctl_iotcl 'sleeping function called from illegal context'

8. Dell STB nVidea 8MB and Dell 1226 Monitor

9. Function call equivalent of 'groups' command

10. Calling 'exec()' functions as someone else under AIX

11. call kernel module functions ?

12. Calling functions in a device driver module

13. call a function in a module