summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ipfw.c
Commit message (Collapse)AuthorAgeFilesLines
* Conditionally compile out V_ globals while instantiating the appropriatezec2008-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-2/+2
| | | | MFC after: 3 months
* Unbreak this.ru2006-02-141-3/+1
|
* Fix check for leading zero, so that it does not block two zeroesglebius2005-05-291-1/+5
| | | | in hook name.
* style: fix indentation and spacing.glebius2005-02-111-4/+4
| | | | Submitted by: ru
* Do not trust ipfw: check m_len always, not only after m_dup.glebius2005-02-111-2/+5
| | | | Submitted by: ru
* - do m_pullup() after m_dup()glebius2005-02-111-3/+4
| | | | | | - clean style in previous commit Suggested by: ru
* pullup to sizeof struct ip before sending to ip_output.glebius2005-02-111-1/+7
| | | | Suggested by: ru
* Packets from ipfw come with IP header in host byte order. Netgraph worksglebius2005-02-111-9/+12
| | | | | | | with net byte order. Change byte order to net in ng_ipfw_input(), change byte order to host before ip_output(), do not change before ip_input(). In collaboration with: ru
* Improve parsing of hook name.glebius2005-02-071-6/+8
| | | | Submitted by: ru
* Add a ng_ipfw node, implementing a quick and simple interface betweenglebius2005-02-051-0/+321
ipfw(4) and netgraph(4) facilities. Reviewed by: andre, brooks, julian
OpenPOWER on IntegriCloud