Bjoern A. Zeeb 42eedeac00 Split eventhandler_register() into an internal part and a wrapper function
that provides the allocated and setup eventhandler entry.

Add a new wrapper for VIMAGE that allocates extra space to hold the
callback function and argument in addition to an extra wrapper function.
While the wrapper function goes as normal callback function the
argument points to the extra space allocated holding the original func
and arg that the wrapper function can then call.

Provide an iterator function for the virtual network stack (vnet) that
will call the callback function for each network stack.

Provide a new set of macros for VNET that in the non-VIMAGE case will
just call eventhandler_register() while in the VIMAGE case it will use
vimage_eventhandler_register() passing in the extra iterator function
but will only register once rather than per-vnet.
We need a special macro in case we are interested in the tag returned
as we must check for curvnet and can neither simply assign the
return value, nor not change it in the non-vnet0 case without that.

Sponsored by:	ISPsystem
Discussed with:	jhb
Reviewed by:	zec (earlier version), jhb
MFC after:	1 month
2010-03-19 19:51:03 +00:00
..
2009-10-27 11:01:15 +00:00
2010-02-27 15:26:36 +00:00
2010-03-11 15:13:55 +00:00
2010-01-07 01:24:09 +00:00
2008-09-22 10:37:02 +00:00
2010-02-03 08:42:08 +00:00
2010-02-18 05:49:52 +00:00
2010-01-04 12:39:42 +00:00
2010-02-07 18:00:13 +00:00
2009-10-27 11:01:15 +00:00
2009-10-27 11:01:15 +00:00
2010-01-04 20:59:52 +00:00
2010-01-04 20:59:52 +00:00
2009-05-26 09:19:21 +00:00
2010-03-11 13:16:06 +00:00