Lines Matching +full:ftm +full:- +full:timer
2 * hostapd - command line interface for hostapd daemon
3 * Copyright (c) 2004-2022, Jouni Malinen <j@w1.fi>
24 "Copyright (c) 2004-2024, Jouni Malinen <j@w1.fi> and contributors";
57 "usage: hostapd_cli [-p<path>] [-i<ifname>] [-hvBr] " in usage()
58 "[-a<path>] \\\n" in usage()
59 " [-P<pid file>] [-G<ping interval>] [command..]\n" in usage()
62 " -h help (show this usage text)\n" in usage()
63 " -v shown version information\n" in usage()
64 " -p<path> path to find control sockets (default: " in usage()
66 " -s<dir_path> dir path to open client sockets (default: " in usage()
68 " -a<file> run in daemon mode executing the action file " in usage()
71 " -r try to reconnect when client socket is " in usage()
73 " This is useful only when used with -a.\n" in usage()
74 " -B run a daemon in the background\n" in usage()
75 " -i<ifname> Interface to listen on (default: first " in usage()
162 return -1; in hostapd_cli_reconnect()
168 return -1; in hostapd_cli_reconnect()
172 return -1; in hostapd_cli_reconnect()
200 printf("Not connected to hostapd - command dropped.\n"); in _wpa_ctrl_command()
201 return -1; in _wpa_ctrl_command()
203 len = sizeof(buf) - 1; in _wpa_ctrl_command()
206 if (ret == -2) { in _wpa_ctrl_command()
208 return -2; in _wpa_ctrl_command()
211 return -1; in _wpa_ctrl_command()
233 printf("Invalid %s command - at least %d argument%s required.\n", in hostapd_cli_cmd()
235 return -1; in hostapd_cli_cmd()
238 return -1; in hostapd_cli_cmd()
265 return wpa_ctrl_command(ctrl, "STATUS-DRIVER"); in hostapd_cli_cmd_status()
291 return -1; in hostapd_cli_exec()
327 printf("Invalid 'sta' command - at least one argument, STA " in hostapd_cli_cmd_sta()
329 return -1; in hostapd_cli_cmd_sta()
359 printf("Invalid 'new_sta' command - exactly one argument, STA " in hostapd_cli_cmd_new_sta()
361 return -1; in hostapd_cli_cmd_new_sta()
373 printf("Invalid 'deauthenticate' command - exactly one " in hostapd_cli_cmd_deauthenticate()
375 return -1; in hostapd_cli_cmd_deauthenticate()
391 printf("Invalid 'disassociate' command - exactly one " in hostapd_cli_cmd_disassociate()
393 return -1; in hostapd_cli_cmd_disassociate()
411 printf("Invalid 'signature' command - exactly one argument, STA address, is required.\n"); in hostapd_cli_cmd_signature()
412 return -1; in hostapd_cli_cmd_signature()
425 printf("Invalid 'sa_query' command - exactly one argument, " in hostapd_cli_cmd_sa_query()
427 return -1; in hostapd_cli_cmd_sa_query()
440 printf("Invalid 'wps_pin' command - at least two arguments, " in hostapd_cli_cmd_wps_pin()
442 return -1; in hostapd_cli_cmd_wps_pin()
464 "- PIN to be verified\n"); in hostapd_cli_cmd_wps_check_pin()
465 return -1; in hostapd_cli_cmd_wps_check_pin()
476 return -1; in hostapd_cli_cmd_wps_check_pin()
505 printf("Invalid 'wps_nfc_tag_read' command - one argument " in hostapd_cli_cmd_wps_nfc_tag_read()
507 return -1; in hostapd_cli_cmd_wps_nfc_tag_read()
513 return -1; in hostapd_cli_cmd_wps_nfc_tag_read()
530 printf("Invalid 'wps_nfc_config_token' command - one argument " in hostapd_cli_cmd_wps_nfc_config_token()
532 return -1; in hostapd_cli_cmd_wps_nfc_config_token()
539 return -1; in hostapd_cli_cmd_wps_nfc_config_token()
552 printf("Invalid 'wps_nfc_token' command - one argument is " in hostapd_cli_cmd_wps_nfc_token()
554 return -1; in hostapd_cli_cmd_wps_nfc_token()
560 return -1; in hostapd_cli_cmd_wps_nfc_token()
573 printf("Invalid 'nfc_get_handover_sel' command - two arguments " in hostapd_cli_cmd_nfc_get_handover_sel()
575 return -1; in hostapd_cli_cmd_nfc_get_handover_sel()
582 return -1; in hostapd_cli_cmd_nfc_get_handover_sel()
595 printf("Invalid 'wps_ap_pin' command - at least one argument " in hostapd_cli_cmd_wps_ap_pin()
597 return -1; in hostapd_cli_cmd_wps_ap_pin()
627 printf("Invalid 'wps_config' command - at least two arguments " in hostapd_cli_cmd_wps_config()
629 return -1; in hostapd_cli_cmd_wps_config()
670 printf("Invalid 'disassoc_imminent' command - two arguments " in hostapd_cli_cmd_disassoc_imminent()
671 "(STA addr and Disassociation Timer) are needed\n"); in hostapd_cli_cmd_disassoc_imminent()
672 return -1; in hostapd_cli_cmd_disassoc_imminent()
678 return -1; in hostapd_cli_cmd_disassoc_imminent()
690 printf("Invalid 'ess_disassoc' command - three arguments (STA " in hostapd_cli_cmd_ess_disassoc()
691 "addr, disassoc timer, and URL) are needed\n"); in hostapd_cli_cmd_ess_disassoc()
692 return -1; in hostapd_cli_cmd_ess_disassoc()
698 return -1; in hostapd_cli_cmd_ess_disassoc()
710 printf("Invalid 'bss_tm_req' command - at least one argument (STA addr) is needed\n"); in hostapd_cli_cmd_bss_tm_req()
711 return -1; in hostapd_cli_cmd_bss_tm_req()
716 return -1; in hostapd_cli_cmd_bss_tm_req()
721 res = os_snprintf(tmp, sizeof(buf) - total, " %s", argv[i]); in hostapd_cli_cmd_bss_tm_req()
722 if (os_snprintf_error(sizeof(buf) - total, res)) in hostapd_cli_cmd_bss_tm_req()
723 return -1; in hostapd_cli_cmd_bss_tm_req()
745 printf("Not connected to hostapd - command dropped.\n"); in wpa_ctrl_command_sta()
746 return -1; in wpa_ctrl_command_sta()
748 len = sizeof(buf) - 1; in wpa_ctrl_command_sta()
751 if (ret == -2) { in wpa_ctrl_command_sta()
753 return -2; in wpa_ctrl_command_sta()
756 return -1; in wpa_ctrl_command_sta()
761 return -1; in wpa_ctrl_command_sta()
779 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 1)) in hostapd_cli_cmd_all_sta()
782 snprintf(cmd, sizeof(cmd), "STA-NEXT %s", addr); in hostapd_cli_cmd_all_sta()
785 return -1; in hostapd_cli_cmd_all_sta()
794 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0)) in hostapd_cli_cmd_list_sta()
799 os_snprintf(cmd, sizeof(cmd), "STA-NEXT %s", addr); in hostapd_cli_cmd_list_sta()
843 printf("Invalid 'set_qos_map_set' command - " in hostapd_cli_cmd_set_qos_map_set()
846 return -1; in hostapd_cli_cmd_set_qos_map_set()
851 return -1; in hostapd_cli_cmd_set_qos_map_set()
863 printf("Invalid 'send_qos_map_conf' command - " in hostapd_cli_cmd_send_qos_map_conf()
865 return -1; in hostapd_cli_cmd_send_qos_map_conf()
870 return -1; in hostapd_cli_cmd_send_qos_map_conf()
882 printf("Invalid 'hs20_wnm_notif' command - two arguments (STA " in hostapd_cli_cmd_hs20_wnm_notif()
884 return -1; in hostapd_cli_cmd_hs20_wnm_notif()
890 return -1; in hostapd_cli_cmd_hs20_wnm_notif()
902 …printf("Invalid 'hs20_deauth_req' command - at least three arguments (STA addr, Code, Re-auth Dela… in hostapd_cli_cmd_hs20_deauth_req()
903 return -1; in hostapd_cli_cmd_hs20_deauth_req()
915 return -1; in hostapd_cli_cmd_hs20_deauth_req()
951 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0)) in update_stations()
956 os_snprintf(cmd, sizeof(cmd), "STA-NEXT %s", addr); in update_stations()
974 if (strcmp(dent->d_name, ".") == 0 || in hostapd_cli_get_interfaces()
975 strcmp(dent->d_name, "..") == 0) in hostapd_cli_get_interfaces()
977 cli_txt_list_add(interfaces, dent->d_name); in hostapd_cli_get_interfaces()
997 if (strcmp(dent->d_name, ".") == 0 || in hostapd_cli_list_interfaces()
998 strcmp(dent->d_name, "..") == 0) in hostapd_cli_list_interfaces()
1000 printf("%s\n", dent->d_name); in hostapd_cli_list_interfaces()
1014 printf("Could not connect to interface '%s' - re-trying\n", in hostapd_cli_cmd_interface()
1047 return -1; in hostapd_cli_cmd_set()
1053 return -1; in hostapd_cli_cmd_set()
1105 return -1; in hostapd_cli_cmd_get()
1111 return -1; in hostapd_cli_cmd_get()
1152 return -1; in hostapd_cli_cmd_fst()
1155 total = os_snprintf(cmd, sizeof(cmd), "FST-MANAGER"); in hostapd_cli_cmd_fst()
1158 res = os_snprintf(cmd + total, sizeof(cmd) - total, " %s", in hostapd_cli_cmd_fst()
1160 if (os_snprintf_error(sizeof(cmd) - total, res)) { in hostapd_cli_cmd_fst()
1162 return -1; in hostapd_cli_cmd_fst()
1195 return -1; in hostapd_cli_cmd_chan_switch()
1202 return -1; in hostapd_cli_cmd_chan_switch()
1208 res = os_snprintf(tmp, sizeof(cmd) - total, " %s", argv[i]); in hostapd_cli_cmd_chan_switch()
1209 if (os_snprintf_error(sizeof(cmd) - total, res)) { in hostapd_cli_cmd_chan_switch()
1211 return -1; in hostapd_cli_cmd_chan_switch()
1297 return -1; in hostapd_cli_cmd_vendor()
1305 return -1; in hostapd_cli_cmd_vendor()
1331 return -1; in hostapd_cli_cmd_log_level()
1340 return -1; in hostapd_cli_cmd_raw()
1341 return hostapd_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]); in hostapd_cli_cmd_raw()
1365 printf("Invalid set_neighbor command: needs 3-6 arguments\n"); in hostapd_cli_cmd_set_neighbor()
1366 return -1; in hostapd_cli_cmd_set_neighbor()
1374 return -1; in hostapd_cli_cmd_set_neighbor()
1401 printf("Invalid req_lci command - requires destination address\n"); in hostapd_cli_cmd_req_lci()
1402 return -1; in hostapd_cli_cmd_req_lci()
1408 return -1; in hostapd_cli_cmd_req_lci()
1418 …printf("Invalid req_range command: needs at least 4 arguments - dest address, randomization interv… in hostapd_cli_cmd_req_range()
1419 return -1; in hostapd_cli_cmd_req_range()
1735 "<params...> = send FST-MANAGER control interface command" },
1764 "<channel_width> = 0 - 20 MHz, 1 - 40 MHz, 2 - 80 MHz, 3 - 160 MHz" },
1767 " = send WNM-Notification Subscription Remediation Request" },
1769 "<addr> <code (0/1)> <Re-auth-Delay(sec)> [url]\n"
1770 " = send WNM-Notification imminent deauthentication indication" },
1810 " = send FTM range request"},
1898 if (cmd->usage == NULL) in print_cmd_help()
1900 fprintf(stream, "%s%s ", pad, cmd->cmd); in print_cmd_help()
1901 for (n = 0; (c = cmd->usage[n]); n++) { in print_cmd_help()
1929 while (cmd->cmd) { in wpa_request()
1930 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) == 0) { in wpa_request()
1932 if (os_strcasecmp(cmd->cmd, argv[0]) == 0) { in wpa_request()
1945 while (cmd->cmd) { in wpa_request()
1946 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) == in wpa_request()
1948 printf(" %s", cmd->cmd); in wpa_request()
1956 match->handler(ctrl, argc - 1, &argv[1]); in wpa_request()
1997 size_t len = sizeof(buf) - 1; in hostapd_cli_recv_pending()
2026 printf("Connection to hostapd lost - trying to reconnect\n"); in hostapd_cli_ping()
2030 printf("Connection to hostapd re-established\n"); in hostapd_cli_ping()
2116 cmd[end - str] = '\0'; in hostapd_cli_edit_completion_cb()
2173 len = sizeof(buf) - 1; in hostapd_cli_action_ping()
2177 printf("hostapd did not reply to PING command - exiting\n"); in hostapd_cli_action_ping()
2217 return -1; in main()
2257 return -1; in main()
2268 return -1; in main()
2276 if (os_strcmp(dent->d_name, ".") == 0 in main()
2278 os_strcmp(dent->d_name, "..") == 0) in main()
2281 dent->d_name); in main()
2282 ctrl_ifname = os_strdup(dent->d_name); in main()
2295 perror("Failed to connect to hostapd - " in main()
2297 return -1; in main()
2301 printf("Could not connect to hostapd - re-trying\n"); in main()
2311 return -1; in main()
2313 return -1; in main()
2326 wpa_request(ctrl_conn, argc - optind, &argv[optind]); in main()
2339 return -1; in main()