MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vnet_tun_init

Function vnet_tun_init

freebsd/net/if_tuntap.c:664–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664static void
665vnet_tun_init(const void *unused __unused)
666{
667 struct tuntap_driver *drv;
668 struct tuntap_driver_cloner *drvc;
669 int i;
670
671 for (i = 0; i < nitems(tuntap_drivers); ++i) {
672 drv = &tuntap_drivers[i];
673 drvc = malloc(sizeof(*drvc), M_TUN, M_WAITOK | M_ZERO);
674
675 drvc->drv = drv;
676 drvc->cloner = if_clone_advanced(drv->cdevsw.d_name, 0,
677 drv->clone_match_fn, drv->clone_create_fn,
678 drv->clone_destroy_fn);
679 SLIST_INSERT_HEAD(&V_tuntap_driver_cloners, drvc, link);
680 };
681}
682VNET_SYSINIT(vnet_tun_init, SI_SUB_PROTO_IF, SI_ORDER_ANY,
683 vnet_tun_init, NULL);
684

Callers

nothing calls this directly

Calls 2

mallocFunction · 0.85
if_clone_advancedFunction · 0.85

Tested by

no test coverage detected