/* $NetBSD: npf_component.c,v 1.2 2016/01/26 23:12:19 pooka Exp $ */ /* * Public Domain. */ #include __KERNEL_RCSID(0, "$NetBSD: npf_component.c,v 1.2 2016/01/26 23:12:19 pooka Exp $"); #include #include #include #include #include #include extern const struct cdevsw npf_cdevsw; RUMP_COMPONENT(RUMP_COMPONENT_NET) { devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR; int error; error = devsw_attach("npf", NULL, &bmajor, &npf_cdevsw, &cmajor); if (error) { panic("npf attach failed: %d", error); } error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/npf", cmajor, 0); if (error) { panic("npf device node creation failed: %d", error); } devsw_detach(NULL, &npf_cdevsw); }