freebsd-skq/sys/netinet/libalias
Marko Zec 385195c062 Conditionally compile out V_ globals while instantiating the appropriate
container structures, depending on VIMAGE_GLOBALS compile time option.

Make VIMAGE_GLOBALS a new compile-time option, which by default will not
be defined, resulting in instatiations of global variables selected for
V_irtualization (enclosed in #ifdef VIMAGE_GLOBALS blocks) to be
effectively compiled out.  Instantiate new global container structures
to hold V_irtualized variables: vnet_net_0, vnet_inet_0, vnet_inet6_0,
vnet_ipsec_0, vnet_netgraph_0, and vnet_gif_0.

Update the VSYM() macro so that depending on VIMAGE_GLOBALS the V_
macros resolve either to the original globals, or to fields inside
container structures, i.e. effectively

#ifdef VIMAGE_GLOBALS
#define V_rt_tables rt_tables
#else
#define V_rt_tables vnet_net_0._rt_tables
#endif

Update SYSCTL_V_*() macros to operate either on globals or on fields
inside container structs.

Extend the internal kldsym() lookups with the ability to resolve
selected fields inside the virtualization container structs.  This
applies only to the fields which are explicitly registered for kldsym()
visibility via VNET_MOD_DECLARE() and vnet_mod_register(), currently
this is done only in sys/net/if.c.

Fix a few broken instances of MODULE_GLOBAL() macro use in SCTP code,
and modify the MODULE_GLOBAL() macro to resolve to V_ macros, which in
turn result in proper code being generated depending on VIMAGE_GLOBALS.

De-virtualize local static variables in sys/contrib/pf/net/pf_subr.c
which were prematurely V_irtualized by automated V_ prepending scripts
during earlier merging steps.  PF virtualization will be done
separately, most probably after next PF import.

Convert a few variable initializations at instantiation to
initialization in init functions, most notably in ipfw.  Also convert
TUNABLE_INT() initializers for V_ variables to TUNABLE_FETCH_INT() in
initializer functions.

Discussed at:	devsummit Strassburg
Reviewed by:	bz, julian
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
2008-12-10 23:12:39 +00:00
..
alias_cuseeme.c Summer of Code 2005: improve libalias - part 1 of 2 2006-09-26 23:26:53 +00:00
alias_db.c Conditionally compile out V_ globals while instantiating the appropriate 2008-12-10 23:12:39 +00:00
alias_dummy.c Summer of Code 2005: improve libalias - part 1 of 2 2006-09-26 23:26:53 +00:00
alias_ftp.c Add support for PORT/EPRT FTP commands in lowercase. 2008-06-21 16:22:56 +00:00
alias_irc.c Explicitate the newpacket size. 2008-03-19 11:28:13 +00:00
alias_local.h Increase LINK_TABLE_OUT_SIZE from 101 to 4001 like LINK_TABLE_IN_SIZE 2008-06-01 18:34:58 +00:00
alias_mod.c o made in kernel libalias mpsafe 2006-12-15 12:50:06 +00:00
alias_mod.h Summer of Code 2005: improve libalias - part 1 of 2 2006-09-26 23:26:53 +00:00
alias_nbt.c Summer of Code 2005: improve libalias - part 1 of 2 2006-09-26 23:26:53 +00:00
alias_pptp.c Summer of Code 2005: improve libalias - part 1 of 2 2006-09-26 23:26:53 +00:00
alias_proxy.c MFP4: 2008-03-06 21:50:41 +00:00
alias_skinny.c Prevent the usage of an uninitialized variable: do not accept 2007-04-07 09:52:36 +00:00
alias_smedia.c MFP4: 2008-03-06 21:50:41 +00:00
alias_util.c Simpler version of the previous commit. 2007-12-06 09:31:13 +00:00
alias.c Implement UDP transparent proxy support. 2008-06-21 20:18:57 +00:00
alias.h -Don't pass down the entire pkt to ProtoAliasIn, ProtoAliasOut, FragmentIn 2008-03-12 11:58:29 +00:00
HISTORY
libalias.3 Merge the rest of my changes. 2006-10-11 07:11:56 +00:00