Re: Modularized net bridging PATCH against pre-2.1.104-1

Adam J. Richter (adam@yggdrasil.com)
Sun, 24 May 1998 09:16:35 -0700


>> +#elif defined(CONFIG_BRIDGE_MODULE)
>> + if (handle_bridge_hook) (*handle_bridge_hook)(skb,type);
>> #endif

>Is this kind of hook permitted?

It seems to be fairly common. For convenience, I actually
started by copying similar lines from the dlci module support
code in the same file.

That said, it might make sense to develop some kind
of standard register_ioctl_handler() interface, because those
additions seem fairly common. In general, I would agree that
a register_foo_handler() interface is better in cases where
multiple modules would be likely to connect, since that might
eliminate some special purpose code from the kernel and would
allow that kernel interface to compile without knowing whether
or not CONFIG_FOO_MODULE is defined. On the hand, for interfaces
that seem applicable to only one module or that are being
developed, hook variables keep the kernel smaller than it would
be with a register_foo_handler() function for every interface
that is used by only one module.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu