views:

144

answers:

2

Is there anyway to do "insmod" and "rmmod" from C/C++ code? Other than running system(...), is there a Kernel API that will allow me to do this?

+3  A: 

Have you looked at the module-init-tools source?

Nikolai N Fetissov
Excellent thanks for that, that should help me. I forgot that I can just look at the source for almost anything.. still stuck in Windows world mentally.
RishiD
+1  A: 

In addition to viewing the source for insmod and module-init-tools you could strace and ltrace a run of insmod.

nategoose
Yep, that too of course.
Nikolai N Fetissov