[NTLUG:Discuss] Internet Sharing in Linux

Steve Baker sjbaker1 at airmail.net
Tue Mar 5 06:35:29 CST 2002


Patrick Parks wrote:

> so it looks like they want me to run this command:
> 
> gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
>             -Wstrict-prototypes -O6 -c dmfe.c
> 
> ok, so lets take a look at this. the -DMODULE would be the module name I
> am trying to compile wich is dmfe.c but would be dmfe.o here?
> 
> the line -D__KERNEL__ I am assuming would be the kernel I am using,
> maybe the path to it?
> 
> And the rest would stay the same?

No - I think they mean you to type that command literally - don't change
the two '-D' options.
 
> Then thats it, or do I have to do something with the makefile?
> 
> I have never done anything to the kernel, so I am very reluctant to try
> this without some guidance. thanks for any help you could provide.

What you are doing here is building a pluggable module to bolt into the
kernel at runtime - this is a relatively simple process.  You'll want to
get familiar with the 'insmod' and 'rmmod' commands that let you install and
remove a kernel module - and of course 'lsmod' that lets you find out what
modules are currently installed - but just follow the instructions I think
you'll be suprised at how easy it is.

The nice thing about modules is that you can test them with insmod/rmmod
and you won't mess anything up permenantly - a reboot restores your kernel
to normal.

----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1 at airmail.net>   WorkMail: <sjbaker at link.com>
URLs : http://www.sjbaker.org
       http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
       http://prettypoly.sf.net http://freeglut.sf.net
       http://toobular.sf.net   http://lodestone.sf.net




More information about the Discuss mailing list