From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alexandros Fragkiadakis" Subject: About loadable kernel modules Date: Wed, 2 Oct 2002 11:04:05 -0700 Sender: netfilter-admin@lists.netfilter.org Message-ID: <001001c26a3e$1900bab0$c5327d9e@alex> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01C26A03.6C92A070" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_000D_01C26A03.6C92A070 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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")=20 system("rmmod kernel_module") respectively. I'd like to pass parameters to the loadable module, hence having a more = flexible user process.=20 So, instead of using the command system("insmod kernel_module.o"), i'd like to use: system("insmod kernel_module.o = ...") , hence passing command line parameters to my loadable module. Do you know if it is possible? Thanks ------=_NextPart_000_000D_01C26A03.6C92A070 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
 
Well, i have written a (netfilter) loadable = kernel module=20 for filtering various packets. I pass these packets from kernel=20 space to user space using libipq.
 I also have a user process thas loads and = unloads=20 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,=20 hence having a more flexible user process.
  So, instead of using the command = system("insmod=20 kernel_module.o"),
i'd like to use: system("insmod = kernel_module.o=20 <param1> <param2>...<param n>")
, hence passing command line parameters to my = loadable=20 module.
 
Do you know if it is possible?
 
Thanks
------=_NextPart_000_000D_01C26A03.6C92A070-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roberto Nibali Subject: Re: About loadable kernel modules Date: Mon, 07 Oct 2002 18:17:21 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <3DA1B391.9090103@tac.ch> References: <001001c26a3e$1900bab0$c5327d9e@alex> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Alexandros Fragkiadakis Cc: netfilter@lists.netfilter.org 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 > ...")/ > , 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Newkirk Subject: Re: About loadable kernel modules Date: Mon, 7 Oct 2002 21:06:51 -0400 Sender: netfilter-admin@lists.netfilter.org Message-ID: <200210072106.51708.netfilter@newkirk.us> References: <001001c26a3e$1900bab0$c5327d9e@alex> Reply-To: netfilter@newkirk.us Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <001001c26a3e$1900bab0$c5327d9e@alex> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: Alexandros Fragkiadakis , netfilter@lists.netfilter.org 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 u= sing > 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 mor= e > flexible user process. So, instead of using the command system("insmod > kernel_module.o"), i'd like to use: system("insmod kernel_module.o > ...") , hence passing command line parameters to my > loadable module. Probably execl(*command,*arg1,*arg2,*arg3...,null) will do what you want. j