Lines Matching refs:interfaces
246 hostapd_interface_init(struct hapd_interfaces *interfaces, in hostapd_interface_init() argument
253 iface = hostapd_init(interfaces, config_fname); in hostapd_interface_init()
256 iface->interfaces = interfaces; in hostapd_interface_init()
302 struct hapd_interfaces *interfaces = signal_ctx; in handle_reload() local
305 hostapd_for_each_interface(interfaces, handle_reload_iface, NULL); in handle_reload()
316 static int hostapd_global_init(struct hapd_interfaces *interfaces, in hostapd_global_init() argument
338 eloop_register_signal(SIGHUP, handle_reload, interfaces); in hostapd_global_init()
339 eloop_register_signal(SIGUSR1, handle_dump_state, interfaces); in hostapd_global_init()
341 eloop_register_signal_terminate(handle_term, interfaces); in hostapd_global_init()
478 static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces, in hostapd_get_global_ctrl_iface() argument
482 os_free(interfaces->global_iface_path); in hostapd_get_global_ctrl_iface()
483 interfaces->global_iface_path = os_strdup(path); in hostapd_get_global_ctrl_iface()
484 if (interfaces->global_iface_path == NULL) in hostapd_get_global_ctrl_iface()
486 pos = os_strrchr(interfaces->global_iface_path, '/'); in hostapd_get_global_ctrl_iface()
490 os_free(interfaces->global_iface_path); in hostapd_get_global_ctrl_iface()
491 interfaces->global_iface_path = NULL; in hostapd_get_global_ctrl_iface()
496 interfaces->global_iface_name = pos + 1; in hostapd_get_global_ctrl_iface()
502 static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces, in hostapd_get_ctrl_iface_group() argument
512 interfaces->ctrl_iface_group = grp->gr_gid; in hostapd_get_ctrl_iface_group()
541 struct hapd_interfaces interfaces; in main() local
557 os_memset(&interfaces, 0, sizeof(interfaces)); in main()
558 interfaces.reload_config = hostapd_reload_config; in main()
559 interfaces.config_read_cb = hostapd_config_read; in main()
560 interfaces.for_each_interface = hostapd_for_each_interface; in main()
561 interfaces.ctrl_iface_init = hostapd_ctrl_iface_init; in main()
562 interfaces.ctrl_iface_deinit = hostapd_ctrl_iface_deinit; in main()
563 interfaces.driver_init = hostapd_driver_init; in main()
564 interfaces.global_iface_path = NULL; in main()
565 interfaces.global_iface_name = NULL; in main()
566 interfaces.global_ctrl_sock = -1; in main()
610 if (hostapd_get_global_ctrl_iface(&interfaces, optarg)) in main()
614 if (hostapd_get_ctrl_iface_group(&interfaces, optarg)) in main()
636 if (optind == argc && interfaces.global_iface_path == NULL && in main()
654 interfaces.count = argc - optind; in main()
655 if (interfaces.count || num_bss_configs) { in main()
656 interfaces.iface = os_calloc(interfaces.count + num_bss_configs, in main()
658 if (interfaces.iface == NULL) { in main()
664 if (hostapd_global_init(&interfaces, entropy_file)) { in main()
670 for (i = 0; i < interfaces.count; i++) { in main()
671 interfaces.iface[i] = hostapd_interface_init(&interfaces, in main()
674 if (!interfaces.iface[i]) { in main()
694 iface = hostapd_interface_init_bss(&interfaces, bss_config[i], in main()
698 for (j = 0; j < interfaces.count; j++) { in main()
699 if (interfaces.iface[j] == iface) in main()
702 if (j == interfaces.count) { in main()
704 tmp = os_realloc_array(interfaces.iface, in main()
705 interfaces.count + 1, in main()
711 interfaces.iface = tmp; in main()
712 interfaces.iface[interfaces.count++] = iface; in main()
724 interfaces.terminate_on_error = interfaces.count; in main()
725 for (i = 0; i < interfaces.count; i++) { in main()
726 if (hostapd_driver_init(interfaces.iface[i]) || in main()
727 hostapd_setup_interface(interfaces.iface[i])) in main()
731 hostapd_global_ctrl_iface_init(&interfaces); in main()
733 if (hostapd_global_run(&interfaces, daemonize, pid_file)) { in main()
741 hostapd_global_ctrl_iface_deinit(&interfaces); in main()
743 for (i = 0; i < interfaces.count; i++) { in main()
744 if (!interfaces.iface[i]) in main()
746 interfaces.iface[i]->driver_ap_teardown = in main()
747 !!(interfaces.iface[i]->drv_flags & in main()
749 hostapd_interface_deinit_free(interfaces.iface[i]); in main()
751 os_free(interfaces.iface); in main()