Deleted Added
full compact
1c1
< /* $FreeBSD: head/sys/netipsec/xform_ah.c 190909 2009-04-11 05:58:58Z zec $ */
---
> /* $FreeBSD: head/sys/netipsec/xform_ah.c 195699 2009-07-14 22:48:30Z rwatson $ */
51a52
> #include <net/vnet.h>
76,86d76
< static int ah_iattach(const void *);
<
< #ifndef VIMAGE_GLOBALS
< static const vnet_modinfo_t vnet_ah_modinfo = {
< .vmi_id = VNET_MOD_AH,
< .vmi_name = "ipsec_ah",
< .vmi_dependson = VNET_MOD_IPSEC,
< .vmi_iattach = ah_iattach
< };
< #endif /* !VIMAGE_GLOBALS */
<
102,106c92,94
< #ifdef VIMAGE_GLOBALS
< int ah_enable;
< int ah_cleartos;
< struct ahstat ahstat;
< #endif
---
> VNET_DEFINE(int, ah_enable) = 1; /* control flow of packets with AH */
> VNET_DEFINE(int, ah_cleartos) = 1; /* clear ip_tos when doing AH calc */
> VNET_DEFINE(struct ahstat, ahstat);
109,114c97,102
< SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ah, OID_AUTO,
< ah_enable, CTLFLAG_RW, ah_enable, 0, "");
< SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ah, OID_AUTO,
< ah_cleartos, CTLFLAG_RW, ah_cleartos, 0, "");
< SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ah, IPSECCTL_STATS,
< stats, CTLFLAG_RD, ahstat, ahstat, "");
---
> SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
> ah_enable, CTLFLAG_RW, &VNET_NAME(ah_enable), 0, "");
> SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
> ah_cleartos, CTLFLAG_RW, &VNET_NAME(ah_cleartos), 0, "");
> SYSCTL_VNET_STRUCT(_net_inet_ah, IPSECCTL_STATS,
> stats, CTLFLAG_RD, &VNET_NAME(ahstat), ahstat, "");
176d163
< INIT_VNET_IPSEC(curvnet);
231d217
< INIT_VNET_IPSEC(curvnet);
266d251
< INIT_VNET_IPSEC(curvnet);
571d555
< INIT_VNET_IPSEC(curvnet);
741d724
< INIT_VNET_IPSEC(curvnet);
904d886
< INIT_VNET_IPSEC(curvnet);
1131d1112
< INIT_VNET_IPSEC(curvnet);
1235,1239d1215
< #ifndef VIMAGE_GLOBALS
< vnet_mod_register(&vnet_ah_modinfo);
< #else
< ah_iattach(NULL);
< #endif
1242,1251d1217
< static int
< ah_iattach(const void *unused __unused)
< {
< INIT_VNET_IPSEC(curvnet);
<
< V_ah_enable = 1; /* control flow of packets with AH */
< V_ah_cleartos = 1; /* clear ip_tos when doing AH calc */
<
< return (0);
< }