Lines Matching full:interfaces
179 * All interfaces participating in the AP MLD would have
215 wpa_drivers[i]->global_init(iface->interfaces);
355 * interfaces. No actual driver operations are started.
358 hostapd_interface_init(struct hapd_interfaces *interfaces, const char *if_name,
365 iface = hostapd_init(interfaces, config_fname);
374 iface->interfaces = interfaces;
421 struct hapd_interfaces *interfaces = signal_ctx;
424 hostapd_for_each_interface(interfaces, handle_reload_iface, NULL);
435 static int hostapd_global_init(struct hapd_interfaces *interfaces,
453 interfaces->eloop_initialized = 1;
458 eloop_register_signal(SIGHUP, handle_reload, interfaces);
459 eloop_register_signal(SIGUSR1, handle_dump_state, interfaces);
461 eloop_register_signal_terminate(handle_term, interfaces);
581 " -G group for control interfaces\n"
595 " -S start all the interfaces synchronously\n"
613 static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces,
620 os_free(interfaces->global_iface_path);
621 interfaces->global_iface_path = os_strdup(path);
622 if (interfaces->global_iface_path == NULL)
626 pos = os_strrchr(interfaces->global_iface_path, '/');
630 os_free(interfaces->global_iface_path);
631 interfaces->global_iface_path = NULL;
636 interfaces->global_iface_name = pos + 1;
643 static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces,
653 interfaces->ctrl_iface_group = grp->gr_gid;
731 struct hapd_interfaces *interfaces = eloop_ctx;
734 hostapd_periodic, interfaces, NULL);
735 hostapd_for_each_interface(interfaces, hostapd_periodic_call, NULL);
739 static void hostapd_global_cleanup_mld(struct hapd_interfaces *interfaces)
744 if (!interfaces || !interfaces->mld)
747 for (i = 0; i < interfaces->mld_count; i++) {
748 if (!interfaces->mld[i])
751 os_free(interfaces->mld[i]);
752 interfaces->mld[i] = NULL;
755 os_free(interfaces->mld);
756 interfaces->mld = NULL;
757 interfaces->mld_count = 0;
764 struct hapd_interfaces interfaces;
786 os_memset(&interfaces, 0, sizeof(interfaces));
787 interfaces.reload_config = hostapd_reload_config;
788 interfaces.config_read_cb = hostapd_config_read;
789 interfaces.for_each_interface = hostapd_for_each_interface;
790 interfaces.ctrl_iface_init = hostapd_ctrl_iface_init;
791 interfaces.ctrl_iface_deinit = hostapd_ctrl_iface_deinit;
792 interfaces.driver_init = hostapd_driver_init;
793 interfaces.global_iface_path = NULL;
794 interfaces.global_iface_name = NULL;
795 interfaces.global_ctrl_sock = -1;
796 dl_list_init(&interfaces.global_ctrl_dst);
798 dl_list_init(&interfaces.eth_p_oui);
802 dpp_conf.cb_ctx = &interfaces;
806 interfaces.dpp = dpp_global_init(&dpp_conf);
807 if (!interfaces.dpp)
852 if (hostapd_get_global_ctrl_iface(&interfaces, optarg))
856 if (hostapd_get_ctrl_iface_group(&interfaces, optarg))
894 if (optind == argc && interfaces.global_iface_path == NULL &&
918 interfaces.count = argc - optind;
919 if (interfaces.count || num_bss_configs) {
920 interfaces.iface = os_calloc(interfaces.count + num_bss_configs,
922 if (interfaces.iface == NULL) {
928 if (hostapd_global_init(&interfaces, entropy_file)) {
934 hostapd_periodic, &interfaces, NULL);
948 for (i = 0; i < interfaces.count; i++) {
954 interfaces.iface[i] = hostapd_interface_init(&interfaces,
958 if (!interfaces.iface[i]) {
963 interfaces.iface[i]->need_to_start_in_sync = 1;
980 iface = hostapd_interface_init_bss(&interfaces, bss_config[i],
984 for (j = 0; j < interfaces.count; j++) {
985 if (interfaces.iface[j] == iface)
988 if (j == interfaces.count) {
990 tmp = os_realloc_array(interfaces.iface,
991 interfaces.count + 1,
997 interfaces.iface = tmp;
998 interfaces.iface[interfaces.count++] = iface;
1003 * Enable configured interfaces. Depending on channel configuration,
1010 interfaces.terminate_on_error = interfaces.count;
1011 for (i = 0; i < interfaces.count; i++) {
1012 if (hostapd_driver_init(interfaces.iface[i]) ||
1013 hostapd_setup_interface(interfaces.iface[i]))
1017 hostapd_global_ctrl_iface_init(&interfaces);
1019 if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
1027 hostapd_global_ctrl_iface_deinit(&interfaces);
1028 /* Deinitialize all interfaces */
1029 for (i = 0; i < interfaces.count; i++) {
1030 if (!interfaces.iface[i])
1032 interfaces.iface[i]->driver_ap_teardown =
1033 !!(interfaces.iface[i]->drv_flags &
1035 hostapd_interface_deinit_free(interfaces.iface[i]);
1036 interfaces.iface[i] = NULL;
1038 os_free(interfaces.iface);
1039 interfaces.iface = NULL;
1040 interfaces.count = 0;
1042 hostapd_global_cleanup_mld(&interfaces);
1045 dpp_global_deinit(interfaces.dpp);
1048 if (interfaces.eloop_initialized)
1049 eloop_cancel_timeout(hostapd_periodic, &interfaces, NULL);
1050 hostapd_global_deinit(pid_file, interfaces.eloop_initialized);