void domaininit(bool addroute) { __link_set_decl(domains, struct domain); struct domain * const * dpp; struct domain *rt_domain = NULL; // sysctl_net_setup(); /* * Add all of the domains. Make sure the PF_ROUTE * domain is added last. */ #if 0 __link_set_foreach(dpp, domains) { if ((*dpp)->dom_family == PF_ROUTE) rt_domain = *dpp; else domain_attach(*dpp); } #else domain_attach(&inetdomain); domain_attach(&arpdomain); #endif if (rt_domain && addroute) domain_attach(rt_domain); callout_init(&pffasttimo_ch, CALLOUT_MPSAFE); callout_init(&pfslowtimo_ch, CALLOUT_MPSAFE); callout_reset(&pffasttimo_ch, 1, pffasttimo, NULL); callout_reset(&pfslowtimo_ch, 1, pfslowtimo, NULL); }
void domaininit(bool attach) { __link_set_decl(domains, struct domain); struct domain * const * dpp; struct domain *rt_domain = NULL; sysctl_net_setup(); /* * Add all of the domains. Make sure the PF_ROUTE * domain is added last. */ if (attach) { __link_set_foreach(dpp, domains) { if (*dpp == &domain_dummy) continue; if ((*dpp)->dom_family == PF_ROUTE) rt_domain = *dpp; else domain_attach(*dpp); } if (rt_domain) domain_attach(rt_domain); } callout_init(&pffasttimo_ch, CALLOUT_MPSAFE); callout_init(&pfslowtimo_ch, CALLOUT_MPSAFE); callout_reset(&pffasttimo_ch, 1, pffasttimo, NULL); callout_reset(&pfslowtimo_ch, 1, pfslowtimo, NULL); }