Lines Matching defs:if_clone
47 #include <net/if_clone.h>
69 struct if_clone {
107 LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */
112 static void if_clone_free(struct if_clone *ifc);
113 static int if_clone_createif_nl(struct if_clone *ifc, const char *name,
116 static int ifc_simple_match(struct if_clone *ifc, const char *name);
117 static int ifc_handle_unit(struct if_clone *ifc, char *name, size_t len, int *punit);
118 static struct if_clone *ifc_find_cloner(const char *name);
119 static struct if_clone *ifc_find_cloner_match(const char *name);
122 static int ifc_simple_create_wrapper(struct if_clone *ifc, char *name, size_t maxlen,
124 static int ifc_advanced_create_wrapper(struct if_clone *ifc, char *name, size_t maxlen,
131 VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners);
141 mtx_init(&(ifc)->ifc_mtx, "if_clone lock", NULL, MTX_DEF)
199 struct if_clone *ifc = ifc_find_cloner_match(name);
221 struct if_clone *ifc = ifc_find_cloner_match(name);
249 struct if_clone *ifc = ifc_find_cloner(ifp->if_dname);
262 struct if_clone *ifc = ifc_find_cloner(ifp->if_dname);
271 ifc_create_ifp_nl_default(struct if_clone *ifc, char *name, size_t len,
303 ifc_link_ifp(struct if_clone *ifc, struct ifnet *ifp)
314 if_clone_addif(struct if_clone *ifc, struct ifnet *ifp)
320 ifc_unlink_ifp(struct if_clone *ifc, struct ifnet *ifp)
339 static struct if_clone *
342 struct if_clone *ifc;
354 static struct if_clone *
357 struct if_clone *ifc;
370 static struct if_clone *
374 struct if_clone *ifc = ifc_find_cloner(name);
384 if_clone_createif_nl(struct if_clone *ifc, const char *ifname, struct ifc_data_nl *ifd)
425 struct if_clone *ifc;
447 if_clone_destroyif_flags(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags)
475 if_clone_destroyif(struct if_clone *ifc, struct ifnet *ifp)
480 static struct if_clone *
483 struct if_clone *ifc;
488 ifc = malloc(sizeof(struct if_clone), M_CLONE, M_WAITOK | M_ZERO);
504 if_clone_attach(struct if_clone *ifc)
506 struct if_clone *ifc1;
522 struct if_clone *
526 struct if_clone *ifc;
559 ifc_detach_cloner(struct if_clone *ifc)
568 ifc_advanced_create_wrapper(struct if_clone *ifc, char *name, size_t maxlen,
579 ifc_advanced_destroy_wrapper(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags)
586 struct if_clone *
590 struct if_clone *ifc;
608 ifc_simple_create_wrapper(struct if_clone *ifc, char *name, size_t maxlen,
621 ifc_simple_destroy_wrapper(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags)
630 struct if_clone *
634 struct if_clone *ifc;
671 if_clone_detach(struct if_clone *ifc)
687 if_clone_free(struct if_clone *ifc)
705 struct if_clone *ifc;
764 struct if_clone *ifc;
830 ifc_alloc_unit_specific(struct if_clone *ifc, int *unit)
852 ifc_alloc_unit_next(struct if_clone *ifc, int *unit)
873 ifc_alloc_unit(struct if_clone *ifc, int *unit)
882 ifc_free_unit(struct if_clone *ifc, int unit)
890 ifc_simple_match(struct if_clone *ifc, const char *name)
911 ifc_handle_unit(struct if_clone *ifc, char *name, size_t len, int *punit)