We currently statically compile in support for a number of protocols. We can make much of this more modular. This will allow users to compile code for the things they want to use and exclude support for things they don't want to use. Additionally, this will allow users to more cleanly insert custom modules to handle some of these protocols.
This changeset includes these logical changes:
- Start conditionally compiling the ip_encaps code based on the protocols that need it. Even if none of the protocols need it, make a config option ENCAPS to compile the support so it is available for modules. Add the ENCAPS option to all existing kernel configurations to keep the current functionality.
- Setup an encapsulation-level mechanism for registering protocols that will use the encapsulation code.
- Switch all current users of the encapsulation interface to registering protocols with the encapsulation code, rather than relying on the current static encapsulated-protocol configuration.
- Add an RSVP_SUPPORT option and make the RSVP support code conditioned on either the RSVP_SUPPORT or MROUTING options. This allows modules to use the RSVP infrastructure even if MROUTING is not compiled, but allows users to drop RSVP support code if they don't need it. Add the RSVP_SUPPORT option to all existing kernel configurations to keep the current functionality.
- Allow the IPv6 destination options extension header code and routing options extension header code to be compiled as modules. Add configuration options ROUTE6 and DEST6 to cause the code to be statically compiled in the kernel. Add the new ROUTE6 and DEST6 options to all existing kernel configurations to keep the current functionality.
NOTE: It is my plan to defer committing this code until after stable/14 has branched.