Lines Matching refs:handles

576 sktc_create_flowswitch_no_address(struct sktc_nexus_handles *handles,  in sktc_create_flowswitch_no_address()  argument
590 if (handles->netif_ifname[0] == '\0') { in sktc_create_flowswitch_no_address()
595 if (strlen(handles->netif_ifname) >= IFNAMSIZ) { in sktc_create_flowswitch_no_address()
597 __func__, handles->netif_ifname); in sktc_create_flowswitch_no_address()
600 handles->controller = os_nexus_controller_create(); in sktc_create_flowswitch_no_address()
601 if (handles->controller == NULL) { in sktc_create_flowswitch_no_address()
608 snprintf(buf, sizeof(buf), "ms_fsw_%s", handles->netif_ifname); in sktc_create_flowswitch_no_address()
611 sktc_build_nexus(handles->controller, &attr, &handles->fsw_prov_uuid, in sktc_create_flowswitch_no_address()
612 &handles->fsw_nx_uuid); in sktc_create_flowswitch_no_address()
615 if (!sktc_get_netif_nexus(handles->netif_ifname, in sktc_create_flowswitch_no_address()
616 handles->netif_nx_uuid)) { in sktc_create_flowswitch_no_address()
617 snprintf(buf, sizeof(buf), "netif_%s", handles->netif_ifname); in sktc_create_flowswitch_no_address()
622 sktc_build_nexus(handles->controller, &attr, in sktc_create_flowswitch_no_address()
623 &handles->netif_prov_uuid, &handles->netif_nx_uuid); in sktc_create_flowswitch_no_address()
624 error = __os_nexus_ifattach(handles->controller, in sktc_create_flowswitch_no_address()
625 handles->netif_nx_uuid, in sktc_create_flowswitch_no_address()
626 handles->netif_ifname, NULL, in sktc_create_flowswitch_no_address()
628 &handles->netif_nx_attach_uuid); in sktc_create_flowswitch_no_address()
636 error = __os_nexus_ifattach(handles->controller, handles->fsw_nx_uuid, in sktc_create_flowswitch_no_address()
637 NULL, handles->netif_nx_uuid, false, &handles->fsw_nx_dev_attach_uuid); in sktc_create_flowswitch_no_address()
647 sktc_nexus_handles_assign_address(struct sktc_nexus_handles *handles) in sktc_nexus_handles_assign_address() argument
651 error = sktc_ifnet_add_addr(handles->netif_ifname, in sktc_nexus_handles_assign_address()
652 &handles->netif_addr, in sktc_nexus_handles_assign_address()
653 &handles->netif_mask, NULL); in sktc_nexus_handles_assign_address()
658 sktc_create_flowswitch(struct sktc_nexus_handles *handles, int i) in sktc_create_flowswitch() argument
663 snprintf(handles->netif_ifname, sizeof(handles->netif_ifname), in sktc_create_flowswitch()
672 handles->netif_addr = sktc_make_in_addr(IN_LINKLOCALNETNUM | val); in sktc_create_flowswitch()
673 handles->netif_mask = sktc_make_in_addr(IN_CLASSC_NET); in sktc_create_flowswitch()
674 sktc_nexus_handles_assign_address(handles); in sktc_create_flowswitch()
677 sktc_create_flowswitch_no_address(handles, -1, -1, -1, -1, 1); in sktc_create_flowswitch()
681 sktc_cleanup_flowswitch(struct sktc_nexus_handles *handles) in sktc_cleanup_flowswitch() argument
685 assert(handles->controller); in sktc_cleanup_flowswitch()
686 assert(!uuid_is_null(handles->fsw_prov_uuid)); in sktc_cleanup_flowswitch()
687 assert(!uuid_is_null(handles->fsw_nx_uuid)); in sktc_cleanup_flowswitch()
689 error = os_nexus_controller_free_provider_instance(handles->controller, in sktc_cleanup_flowswitch()
690 handles->fsw_nx_uuid); in sktc_cleanup_flowswitch()
693 error = os_nexus_controller_deregister_provider(handles->controller, in sktc_cleanup_flowswitch()
694 handles->fsw_prov_uuid); in sktc_cleanup_flowswitch()
697 os_nexus_controller_destroy(handles->controller); in sktc_cleanup_flowswitch()
699 error = sktc_ifnet_del_addr(handles->netif_ifname, &handles->netif_addr); in sktc_cleanup_flowswitch()