Home | History | Annotate | Download | only in hostapd

Lines Matching refs:interfaces

290 hostapd_interface_init(struct hapd_interfaces *interfaces,
300 iface->interfaces = interfaces;
352 struct hapd_interfaces *interfaces = signal_ctx;
355 hostapd_for_each_interface(interfaces, handle_reload_iface, NULL);
362 struct hapd_interfaces *interfaces = signal_ctx;
363 hostapd_for_each_interface(interfaces, handle_dump_state_iface, NULL);
369 static int hostapd_global_init(struct hapd_interfaces *interfaces,
391 eloop_register_signal(SIGHUP, handle_reload, interfaces);
392 eloop_register_signal(SIGUSR1, handle_dump_state, interfaces);
394 eloop_register_signal_terminate(handle_term, interfaces);
504 " -G group for control interfaces\n"
526 static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces,
530 os_free(interfaces->global_iface_path);
531 interfaces->global_iface_path = os_strdup(path);
532 if (interfaces->global_iface_path == NULL)
534 pos = os_strrchr(interfaces->global_iface_path, '/');
538 os_free(interfaces->global_iface_path);
539 interfaces->global_iface_path = NULL;
544 interfaces->global_iface_name = pos + 1;
550 static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces,
560 interfaces->ctrl_iface_group = grp->gr_gid;
568 struct hapd_interfaces interfaces;
579 os_memset(&interfaces, 0, sizeof(interfaces));
580 interfaces.reload_config = hostapd_reload_config;
581 interfaces.config_read_cb = hostapd_config_read;
582 interfaces.for_each_interface = hostapd_for_each_interface;
583 interfaces.ctrl_iface_init = hostapd_ctrl_iface_init;
584 interfaces.ctrl_iface_deinit = hostapd_ctrl_iface_deinit;
585 interfaces.driver_init = hostapd_driver_init;
586 interfaces.global_iface_path = NULL;
587 interfaces.global_iface_name = NULL;
588 interfaces.global_ctrl_sock = -1;
627 if (hostapd_get_global_ctrl_iface(&interfaces, optarg))
631 if (hostapd_get_ctrl_iface_group(&interfaces, optarg))
640 if (optind == argc && interfaces.global_iface_path == NULL)
648 interfaces.count = argc - optind;
649 if (interfaces.count) {
650 interfaces.iface = os_calloc(interfaces.count,
652 if (interfaces.iface == NULL) {
658 if (hostapd_global_init(&interfaces, entropy_file)) {
663 /* Initialize interfaces */
664 for (i = 0; i < interfaces.count; i++) {
665 interfaces.iface[i] = hostapd_interface_init(&interfaces,
668 if (!interfaces.iface[i]) {
674 hostapd_global_ctrl_iface_init(&interfaces);
676 if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
684 hostapd_global_ctrl_iface_deinit(&interfaces);
685 /* Deinitialize all interfaces */
686 for (i = 0; i < interfaces.count; i++)
687 hostapd_interface_deinit_free(interfaces.iface[i]);
688 os_free(interfaces.iface);