Re: Separate network module from kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 30, 2003 at 21:31:18 +0000, Heilai Renett wrote:
> >--- Heilai Renett <heilairenett@hotmail.com> wrote:
> >
> >> Can I take out the network module from the kernel,
> >> then install it using "insmod" after kernel
> >> boots up?
> >
> >Not an easy task, I think. You need to go over
> >the complete networking code to find out what symbols
> >it needs and make sure all of them are exported.
> >You have to make sure that dependency is one way
> >only, i.e. it should not happen that n/w module
> >depends on kernel and some piece of the kernel
> >depends on n/w module. You may also have to add
> >reference counting for network objects in other pats
> >of the kernel (at least ensure that it is already
> >done). And write a proper module exit function that
> >takes care of various race conditions.
> 
> Yes, it looks hairy, but I still want to make sure if it is doable. :-)
> 
> If I want to take out the "TCP/IP networking" part, can I just not select 
> "TCP/IP networking" when I do "make xconifg"? This might make the kernel 
> not depend on this module, but I don't know how to make TCP/IP module not 
> depend on kernel.

Modules depend on kernel -- that's ok.

However, turning the option off might not work. If there is
a conidtional compilation depending on that option, you will need to
have that compiled.

If, in addition, these conditional compilations require functions from
af_inet.c, you are mostly out of luck.

> Furthermore, I noticed that both "/net/ipv4/af_inet.c" and 
> "/net/ipv6/af_inet6.c" have a line which is "module_init(inet_init)". This 
> make me think that there might be a way to compile the TCP/IP stack as a 
> module. Is it true?

No. module_init is just a misnamed init (for historical reasons). It is
used to initialize both in-kernel and module code. Now if there is
a module_exit, that would mean something (because that reduces to
nothing in kernel, so it means some module support).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux