All of lore.kernel.org
 help / color / mirror / Atom feed
* About loadable kernel modules
@ 2002-10-02 18:04 Alexandros Fragkiadakis
  2002-10-07 16:17 ` Roberto Nibali
  2002-10-08  1:06 ` Joel Newkirk
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandros Fragkiadakis @ 2002-10-02 18:04 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

Hi all,

Well, i have written a (netfilter) loadable kernel module for filtering various packets. I pass these packets from kernel space to user space using libipq.
 I also have a user process thas loads and unloads this loadable kernel module using the commands:
system("insmod kernel_module.o") 
system("rmmod kernel_module") respectively.

 I'd like to pass parameters to the loadable module, hence having a more flexible user process. 
  So, instead of using the command system("insmod kernel_module.o"),
i'd like to use: system("insmod kernel_module.o <param1> <param2>...<param n>")
, hence passing command line parameters to my loadable module.

Do you know if it is possible?

Thanks

[-- Attachment #2: Type: text/html, Size: 1600 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About loadable kernel modules
  2002-10-02 18:04 About loadable kernel modules Alexandros Fragkiadakis
@ 2002-10-07 16:17 ` Roberto Nibali
  2002-10-08  1:06 ` Joel Newkirk
  1 sibling, 0 replies; 3+ messages in thread
From: Roberto Nibali @ 2002-10-07 16:17 UTC (permalink / raw)
  To: Alexandros Fragkiadakis; +Cc: netfilter

Hello,

>  I also have a user process thas loads and unloads this loadable kernel 
> module using the commands:
> system("insmod kernel_module.o")
> system("rmmod kernel_module") respectively.

Ok.

>  I'd like to pass parameters to the loadable module, hence having a more 
> flexible user process.
>   So, instead of using the command /system("insmod kernel_module.o"),/
> i'd like to use: /system("insmod kernel_module.o <param1> 
> <param2>...<param n>")/
> , hence passing command line parameters to my loadable module.
>  
> Do you know if it is possible?

You definitely want the know about the MODULE_PARM() macro. Get more information 
by reading an existing module like for example:

grep ^MODULE_ /usr/src/linux/drivers/net/3c59x.c

Best regards,
Roberto Nibali, ratz
-- 
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About loadable kernel modules
  2002-10-02 18:04 About loadable kernel modules Alexandros Fragkiadakis
  2002-10-07 16:17 ` Roberto Nibali
@ 2002-10-08  1:06 ` Joel Newkirk
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Newkirk @ 2002-10-08  1:06 UTC (permalink / raw)
  To: Alexandros Fragkiadakis, netfilter

On Wednesday 02 October 2002 02:04 pm, Alexandros Fragkiadakis wrote:
> Hi all,
>
> Well, i have written a (netfilter) loadable kernel module for filtering
> various packets. I pass these packets from kernel space to user space using
> libipq. I also have a user process thas loads and unloads this loadable
> kernel module using the commands: system("insmod kernel_module.o")
> system("rmmod kernel_module") respectively.
>
>  I'd like to pass parameters to the loadable module, hence having a more
> flexible user process. So, instead of using the command system("insmod
> kernel_module.o"), i'd like to use: system("insmod kernel_module.o <param1>
> <param2>...<param n>") , hence passing command line parameters to my
> loadable module.

Probably execl(*command,*arg1,*arg2,*arg3...,null) will do what you want.

j



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-08  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-02 18:04 About loadable kernel modules Alexandros Fragkiadakis
2002-10-07 16:17 ` Roberto Nibali
2002-10-08  1:06 ` Joel Newkirk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.