Lines Matching refs:interfaces

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