Lines Matching refs:interfaces
179 wpa_drivers[i]->global_init(iface->interfaces); in hostapd_driver_init()
258 hostapd_interface_init(struct hapd_interfaces *interfaces, const char *if_name, in hostapd_interface_init() argument
265 iface = hostapd_init(interfaces, config_fname); in hostapd_interface_init()
274 iface->interfaces = interfaces; in hostapd_interface_init()
321 struct hapd_interfaces *interfaces = signal_ctx; in handle_reload() local
324 hostapd_for_each_interface(interfaces, handle_reload_iface, NULL); in handle_reload()
335 static int hostapd_global_init(struct hapd_interfaces *interfaces, in hostapd_global_init() argument
353 interfaces->eloop_initialized = 1; in hostapd_global_init()
358 eloop_register_signal(SIGHUP, handle_reload, interfaces); in hostapd_global_init()
359 eloop_register_signal(SIGUSR1, handle_dump_state, interfaces); in hostapd_global_init()
361 eloop_register_signal_terminate(handle_term, interfaces); in hostapd_global_init()
511 static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces, in hostapd_get_global_ctrl_iface() argument
518 os_free(interfaces->global_iface_path); in hostapd_get_global_ctrl_iface()
519 interfaces->global_iface_path = os_strdup(path); in hostapd_get_global_ctrl_iface()
520 if (interfaces->global_iface_path == NULL) in hostapd_get_global_ctrl_iface()
524 pos = os_strrchr(interfaces->global_iface_path, '/'); in hostapd_get_global_ctrl_iface()
528 os_free(interfaces->global_iface_path); in hostapd_get_global_ctrl_iface()
529 interfaces->global_iface_path = NULL; in hostapd_get_global_ctrl_iface()
534 interfaces->global_iface_name = pos + 1; in hostapd_get_global_ctrl_iface()
541 static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces, in hostapd_get_ctrl_iface_group() argument
551 interfaces->ctrl_iface_group = grp->gr_gid; in hostapd_get_ctrl_iface_group()
629 struct hapd_interfaces *interfaces = eloop_ctx; in hostapd_periodic() local
632 hostapd_periodic, interfaces, NULL); in hostapd_periodic()
633 hostapd_for_each_interface(interfaces, hostapd_periodic_call, NULL); in hostapd_periodic()
639 struct hapd_interfaces interfaces; in main() local
658 os_memset(&interfaces, 0, sizeof(interfaces)); in main()
659 interfaces.reload_config = hostapd_reload_config; in main()
660 interfaces.config_read_cb = hostapd_config_read; in main()
661 interfaces.for_each_interface = hostapd_for_each_interface; in main()
662 interfaces.ctrl_iface_init = hostapd_ctrl_iface_init; in main()
663 interfaces.ctrl_iface_deinit = hostapd_ctrl_iface_deinit; in main()
664 interfaces.driver_init = hostapd_driver_init; in main()
665 interfaces.global_iface_path = NULL; in main()
666 interfaces.global_iface_name = NULL; in main()
667 interfaces.global_ctrl_sock = -1; in main()
668 dl_list_init(&interfaces.global_ctrl_dst); in main()
712 if (hostapd_get_global_ctrl_iface(&interfaces, optarg)) in main()
716 if (hostapd_get_ctrl_iface_group(&interfaces, optarg)) in main()
751 if (optind == argc && interfaces.global_iface_path == NULL && in main()
775 interfaces.count = argc - optind; in main()
776 if (interfaces.count || num_bss_configs) { in main()
777 interfaces.iface = os_calloc(interfaces.count + num_bss_configs, in main()
779 if (interfaces.iface == NULL) { in main()
785 if (hostapd_global_init(&interfaces, entropy_file)) { in main()
791 hostapd_periodic, &interfaces, NULL); in main()
805 for (i = 0; i < interfaces.count; i++) { in main()
811 interfaces.iface[i] = hostapd_interface_init(&interfaces, in main()
815 if (!interfaces.iface[i]) { in main()
820 interfaces.iface[i]->need_to_start_in_sync = 1; in main()
837 iface = hostapd_interface_init_bss(&interfaces, bss_config[i], in main()
841 for (j = 0; j < interfaces.count; j++) { in main()
842 if (interfaces.iface[j] == iface) in main()
845 if (j == interfaces.count) { in main()
847 tmp = os_realloc_array(interfaces.iface, in main()
848 interfaces.count + 1, in main()
854 interfaces.iface = tmp; in main()
855 interfaces.iface[interfaces.count++] = iface; in main()
867 interfaces.terminate_on_error = interfaces.count; in main()
868 for (i = 0; i < interfaces.count; i++) { in main()
869 if (hostapd_driver_init(interfaces.iface[i]) || in main()
870 hostapd_setup_interface(interfaces.iface[i])) in main()
874 hostapd_global_ctrl_iface_init(&interfaces); in main()
876 if (hostapd_global_run(&interfaces, daemonize, pid_file)) { in main()
884 hostapd_global_ctrl_iface_deinit(&interfaces); in main()
886 for (i = 0; i < interfaces.count; i++) { in main()
887 if (!interfaces.iface[i]) in main()
889 interfaces.iface[i]->driver_ap_teardown = in main()
890 !!(interfaces.iface[i]->drv_flags & in main()
892 hostapd_interface_deinit_free(interfaces.iface[i]); in main()
894 os_free(interfaces.iface); in main()
896 if (interfaces.eloop_initialized) in main()
897 eloop_cancel_timeout(hostapd_periodic, &interfaces, NULL); in main()
898 hostapd_global_deinit(pid_file, interfaces.eloop_initialized); in main()