Lines Matching refs:handles

562 sktc_create_flowswitch_no_address(struct sktc_nexus_handles *handles,  in sktc_create_flowswitch_no_address()  argument
576 if (handles->netif_ifname[0] == '\0') { in sktc_create_flowswitch_no_address()
581 if (strlen(handles->netif_ifname) >= IFNAMSIZ) { in sktc_create_flowswitch_no_address()
583 __func__, handles->netif_ifname); in sktc_create_flowswitch_no_address()
586 handles->controller = os_nexus_controller_create(); in sktc_create_flowswitch_no_address()
587 if (handles->controller == NULL) { in sktc_create_flowswitch_no_address()
594 snprintf(buf, sizeof(buf), "ms_fsw_%s", handles->netif_ifname); in sktc_create_flowswitch_no_address()
597 sktc_build_nexus(handles->controller, &attr, &handles->fsw_prov_uuid, in sktc_create_flowswitch_no_address()
598 &handles->fsw_nx_uuid); in sktc_create_flowswitch_no_address()
601 if (!sktc_get_netif_nexus(handles->netif_ifname, in sktc_create_flowswitch_no_address()
602 handles->netif_nx_uuid)) { in sktc_create_flowswitch_no_address()
603 snprintf(buf, sizeof(buf), "netif_%s", handles->netif_ifname); in sktc_create_flowswitch_no_address()
608 sktc_build_nexus(handles->controller, &attr, in sktc_create_flowswitch_no_address()
609 &handles->netif_prov_uuid, &handles->netif_nx_uuid); in sktc_create_flowswitch_no_address()
610 error = __os_nexus_ifattach(handles->controller, in sktc_create_flowswitch_no_address()
611 handles->netif_nx_uuid, in sktc_create_flowswitch_no_address()
612 handles->netif_ifname, NULL, in sktc_create_flowswitch_no_address()
614 &handles->netif_nx_attach_uuid); in sktc_create_flowswitch_no_address()
622 error = __os_nexus_ifattach(handles->controller, handles->fsw_nx_uuid, in sktc_create_flowswitch_no_address()
623 NULL, handles->netif_nx_uuid, false, &handles->fsw_nx_dev_attach_uuid); in sktc_create_flowswitch_no_address()
633 sktc_nexus_handles_assign_address(struct sktc_nexus_handles *handles) in sktc_nexus_handles_assign_address() argument
637 error = sktc_ifnet_add_addr(handles->netif_ifname, in sktc_nexus_handles_assign_address()
638 &handles->netif_addr, in sktc_nexus_handles_assign_address()
639 &handles->netif_mask, NULL); in sktc_nexus_handles_assign_address()
644 sktc_create_flowswitch(struct sktc_nexus_handles *handles, int i) in sktc_create_flowswitch() argument
649 snprintf(handles->netif_ifname, sizeof(handles->netif_ifname), in sktc_create_flowswitch()
658 handles->netif_addr = sktc_make_in_addr(IN_LINKLOCALNETNUM | val); in sktc_create_flowswitch()
659 handles->netif_mask = sktc_make_in_addr(IN_CLASSC_NET); in sktc_create_flowswitch()
660 sktc_nexus_handles_assign_address(handles); in sktc_create_flowswitch()
663 sktc_create_flowswitch_no_address(handles, -1, -1, -1, -1, 1); in sktc_create_flowswitch()
667 sktc_cleanup_flowswitch(struct sktc_nexus_handles *handles) in sktc_cleanup_flowswitch() argument
671 assert(handles->controller); in sktc_cleanup_flowswitch()
672 assert(!uuid_is_null(handles->fsw_prov_uuid)); in sktc_cleanup_flowswitch()
673 assert(!uuid_is_null(handles->fsw_nx_uuid)); in sktc_cleanup_flowswitch()
675 error = os_nexus_controller_free_provider_instance(handles->controller, in sktc_cleanup_flowswitch()
676 handles->fsw_nx_uuid); in sktc_cleanup_flowswitch()
679 error = os_nexus_controller_deregister_provider(handles->controller, in sktc_cleanup_flowswitch()
680 handles->fsw_prov_uuid); in sktc_cleanup_flowswitch()
683 os_nexus_controller_destroy(handles->controller); in sktc_cleanup_flowswitch()
685 error = sktc_ifnet_del_addr(handles->netif_ifname, &handles->netif_addr); in sktc_cleanup_flowswitch()