Home | History | Annotate | Download | only in npf

Lines Matching refs:npf

31  * NPF main: dynamic load/initialisation and unload routines.
40 #if NPF > 0
41 #error "NPF and PF are mutually exclusive; please select one"
81 MODULE(MODULE_CLASS_MISC, npf, "bpf");
83 /* This module autoloads via /dev/npf so it needs to be a driver */
84 MODULE(MODULE_CLASS_DRIVER, npf, "bpf");
138 npf_t *npf = npf_getkernctx();
145 npfk_destroy(npf);
153 npf_t *npf;
159 npf = npfk_create(0, NULL, &kern_ifops, NULL);
160 npf_setkernctx(npf);
166 /* Attach /dev/npf device. */
167 error = devsw_attach("npf", NULL, &bmajor, &npf_cdevsw, &cmajor);
226 npf_stats_export(npf_t *npf, void *data)
232 npfk_stats(npf, fullst); /* will zero the buffer */
261 npf_t *npf = npf_getkernctx();
278 return npfctl_table(npf, data);
280 return npf_stats_export(npf, data);
306 if ((error = npfctl_run_op(npf, cmd, req, resp)) == 0) {
334 npf_t *npf = npf_getkernctx();
336 npf_config_enter(npf);
337 bool pass = npf_default_pass(npf);
338 npf_config_exit(npf);
348 npf_ifop_getname(npf_t *npf __unused, ifnet_t *ifp)
354 npf_ifop_lookup(npf_t *npf __unused, const char *name)
360 npf_ifop_flush(npf_t *npf __unused, void *arg)
374 npf_ifop_getmeta(npf_t *npf __unused, const ifnet_t *ifp)
380 npf_ifop_setmeta(npf_t *npf __unused, ifnet_t *ifp, void *arg)
388 * Wrapper of the main packet handler to pass the kernel NPF context.
393 npf_t *npf = npf_getkernctx();
394 return npfk_packet_handler(npf, mp, ifp, di);
400 npf_t *npf = npf_getkernctx();
401 return npfk_layer2_handler(npf, mp, ifp, di);
410 npf_t *npf = npf_getkernctx();
415 npfk_ifmap_attach(npf, ifp);
416 npf_ifaddr_sync(npf, ifp);
419 npfk_ifmap_detach(npf, ifp);
420 npf_ifaddr_flush(npf, ifp);
428 npf_t *npf = npf_getkernctx();
445 npf_ifaddr_sync(npf, ifa->ifa_ifp);
449 register_etherpfil_hook(npf_t *npf, ifnet_t *ifp, int i)
460 error = pfil_add_hook(npfos_layer2_handler, npf,
470 get_etherpfil_head(npf_t *npf)
478 error = register_etherpfil_hook(npf, ifp, i);
489 destroy_pfilether_hook(npf_t *npf)
496 (void)pfil_remove_hook(npfos_layer2_handler, npf,
509 npf_t *npf = npf_getkernctx();
550 error = pfil_add_hook(npfos_packet_handler, npf,
555 error = pfil_add_hook(npfos_packet_handler, npf,
560 get_etherpfil_head(npf);
566 npf_ifaddr_syncall(npf);
580 npf_t *npf = npf_getkernctx();
591 (void)pfil_remove_hook(npfos_packet_handler, npf,
595 (void)pfil_remove_hook(npfos_packet_handler, npf,
598 destroy_pfilether_hook(npf);
617 * which provides sufficient guarantees for NPF.