Lines Matching refs:interfaces
283 hostapd_interface_init(struct hapd_interfaces *interfaces, in hostapd_interface_init() argument
293 iface->interfaces = interfaces; in hostapd_interface_init()
340 struct hapd_interfaces *interfaces = signal_ctx; in handle_reload() local
343 hostapd_for_each_interface(interfaces, handle_reload_iface, NULL); in handle_reload()
350 struct hapd_interfaces *interfaces = signal_ctx; in handle_dump_state() local
351 hostapd_for_each_interface(interfaces, handle_dump_state_iface, NULL); in handle_dump_state()
357 static int hostapd_global_init(struct hapd_interfaces *interfaces, in hostapd_global_init() argument
379 eloop_register_signal(SIGHUP, handle_reload, interfaces); in hostapd_global_init()
380 eloop_register_signal(SIGUSR1, handle_dump_state, interfaces); in hostapd_global_init()
382 eloop_register_signal_terminate(handle_term, interfaces); in hostapd_global_init()
512 static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces, in hostapd_get_global_ctrl_iface() argument
516 os_free(interfaces->global_iface_path); in hostapd_get_global_ctrl_iface()
517 interfaces->global_iface_path = os_strdup(path); in hostapd_get_global_ctrl_iface()
518 if (interfaces->global_iface_path == NULL) in hostapd_get_global_ctrl_iface()
520 pos = os_strrchr(interfaces->global_iface_path, '/'); in hostapd_get_global_ctrl_iface()
522 os_free(interfaces->global_iface_path); in hostapd_get_global_ctrl_iface()
523 interfaces->global_iface_path = NULL; in hostapd_get_global_ctrl_iface()
528 interfaces->global_iface_name = pos + 1; in hostapd_get_global_ctrl_iface()
536 struct hapd_interfaces interfaces; in main() local
547 os_memset(&interfaces, 0, sizeof(interfaces)); in main()
548 interfaces.reload_config = hostapd_reload_config; in main()
549 interfaces.config_read_cb = hostapd_config_read; in main()
550 interfaces.for_each_interface = hostapd_for_each_interface; in main()
551 interfaces.ctrl_iface_init = hostapd_ctrl_iface_init; in main()
552 interfaces.ctrl_iface_deinit = hostapd_ctrl_iface_deinit; in main()
553 interfaces.driver_init = hostapd_driver_init; in main()
554 interfaces.global_iface_path = NULL; in main()
555 interfaces.global_iface_name = NULL; in main()
556 interfaces.global_ctrl_sock = -1; in main()
595 hostapd_get_global_ctrl_iface(&interfaces, optarg); in main()
604 if (optind == argc && interfaces.global_iface_path == NULL) in main()
612 interfaces.count = argc - optind; in main()
613 if (interfaces.count) { in main()
614 interfaces.iface = os_calloc(interfaces.count, in main()
616 if (interfaces.iface == NULL) { in main()
622 if (hostapd_global_init(&interfaces, entropy_file)) in main()
626 for (i = 0; i < interfaces.count; i++) { in main()
627 interfaces.iface[i] = hostapd_interface_init(&interfaces, in main()
630 if (!interfaces.iface[i]) in main()
634 hostapd_global_ctrl_iface_init(&interfaces); in main()
636 if (hostapd_global_run(&interfaces, daemonize, pid_file)) in main()
642 hostapd_global_ctrl_iface_deinit(&interfaces); in main()
644 for (i = 0; i < interfaces.count; i++) in main()
645 hostapd_interface_deinit_free(interfaces.iface[i]); in main()
646 os_free(interfaces.iface); in main()