aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
Commit message (Collapse)AuthorAgeFilesLines
* AP: Add wpa_psk_file reloading in runtimeMichal Kazior2019-01-261-0/+9
| | | | | | | | | | | | | The wpa_psk_file can now be modified and hostapd can be told to re-read it with the control interface RELOAD_WPA_PSK command: $ hostapd_cli reload_wpa_psk It must be noted special care must be taken if WPS is configured (wps_state=2, eap_server=1) because WPS appends PMKs to the wpa_psk_file. Signed-off-by: Michal Kazior <michal@plume.com>
* hostapd_cli: Add option to send beacon report requestAvraham Stern2019-01-021-0/+9
| | | | | | This new 'req_beacon' command is useful for testing. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* Update copyright notices for the new year 2019Jouni Malinen2019-01-011-2/+2
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* DPP: Add self configuration command in hostapd_cli and wpa_cliPrasad, Jagadeesh (Contractor)2018-12-211-0/+9
| | | | | | | | | The back-end support for DPP self configuration was already present in hostapd and wpa_supplicant. However, the command to invoke DPP self configuration was not available in hostapd_cli and wpa_cli. Add the command "dpp_configurator_sign" in them. Signed-off-by: Prasad, Jagadeesh <Jagadeesh_Prasad@comcast.com>
* Update version to v2.7 and copyright years to include 2018hostap_2_7Jouni Malinen2018-12-021-2/+2
| | | | | | | Also add the ChangeLog entries for both hostapd and wpa_supplicant to describe main changes between v2.6 and v2.7. Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix dpp_configurator_get_key command name in hostapd_cliDamodaran, Rohit (Contractor)2018-11-221-1/+1
| | | | | | | | The option to get DPP configurator key in hostapd_cli was named incorrectly. It was wrongly pointing to dpp_configurator_remove. Fix this by using the correct name. Signed-off-by: Rohit Damodaran <Rohit_Damodaran@comcast.com>
* Add hostapd_cli poll_sta commandBhagavathi Perumal S2018-03-191-0/+9
| | | | | | | | This uses the already existing POLL_STA control interface to poll an associated station to check connectivity. Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org> Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
* DPP: Support retrieving of configurator's private keyPurushottam Kushwaha2018-03-161-0/+10
| | | | | | | | | | | | | | | | | | To retain configurator information across hostapd/wpa_supplicant restart, private key need to be maintained to generate a valid pair of authentication keys (connector, netaccess_key, csign) for new enrollees in the network. Add a DPP_CONFIGURATOR_GET_KEY control interface API through which the private key of an existing configurator can be fetched. Command format: DPP_CONFIGURATOR_GET_KEY <configurator_id> The output from this command can then be used with "DPP_CONFIGURATOR_ADD key=<hexdump>" to create the same key again. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* hostapd: Dynamic MAC ACL management over control interfaceTamizh chelvam2018-02-071-0/+18
| | | | | | | | | | | | | | Previously, MAC ACL could be modified only through file operations (modify accept/deny_mac_file and reload it to hostapd). Extend this to allow MAC ACL to be modified and displayed through new control interface commands: ACCEPT_ACL <subcmd> [argument] DENY_ACL <subcmd> [argument] subcmd: ADD_MAC <addr>[ VLAN_ID=<id>]|DEL_MAC <addr>|SHOW|CLEAR Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
* hostapd_cli: Add dpp_listen and dpp_stop_listenJouni Malinen2017-12-111-0/+18
| | | | | | | | Now that hostapd exposes the DPP_LISTEN and DPP_STOP_LISTEN commands similarly to wpa_supplicant, expose these through proper hostapd_cli commands as well to match wpa_cli functionality. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Add control interface commands into hostapd_cliJouni Malinen2017-07-041-0/+97
| | | | | | These are copied from wpa_cli. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Increase hostapd_cli buffer limitsJouni Malinen2017-07-021-2/+2
| | | | | | This is needed for DPP events/commands. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Update copyright notices for the new year 2017Jouni Malinen2017-01-031-2/+2
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* hostapd_cli: Add completion for get commandMikael Kanstrup2016-12-211-1/+26
| | | | | | Add command completion support for get command. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Add completion for set commandMikael Kanstrup2016-12-211-1/+39
| | | | | | Add command completion support for set command. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Completion for further commands with STA parameterMikael Kanstrup2016-12-211-4/+5
| | | | | | | | | Yet some more commands take STA address as the only parameter. Add command completion support for the following commands: signature, sa_query, send_qos_map_conf and req_lci Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Use common completion for commands that use stationsMikael Kanstrup2016-12-211-34/+4
| | | | | | | More than one command takes STA address as the only parameter. Make use of a common completion routine. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Add missing command help descriptionsMikael Kanstrup2016-12-211-27/+60
| | | | | | | | Some commands are missing help description making them not show up in the list of supported commands. Add command help description for all missing commands. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd: Add a configuration to set an AP as stationaryDavid Spinadel2016-10-291-4/+4
| | | | | | | | | | | Add a configuration option in hostapd.conf and in neighbor report that sets an AP as stationary. To enable this option on the current AP set the config option stationary_ap to 1. To set a neighbor entry to be marked as stationary add the word stat to the SET_NEIGHBOR command. This option tells hostapd to send LCI data even if it is older than requested by max age subelement in RRM request. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd_cli: Remove duplicate const in hostapd_cli_cmd()Dmitry Shmidt2016-10-281-1/+1
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* hostapd_cli: Mark number of char *cmd constantJouni Malinen2016-10-161-4/+4
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* cli: Add list_sta commandMikael Kanstrup2016-10-161-0/+19
| | | | | | | Add list_sta command to print addresses of all stations. Command added to both wpa_cli and hostapd_cli. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Process events received following control iface commandsMikael Kanstrup2016-10-161-0/+2
| | | | | | | | | | | Events received as an immediate result of control interface commands end up on the control request message callback function instead of the registered read socket. This makes for example the station list used for complete functions for disassociate and deauthenticate out of sync. Process events in the message callback function too to ensure no events are missed. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Refactor control iface reconnects with common helperMikael Kanstrup2016-10-161-45/+38
| | | | | | | | Code for connecting/reconnecting to the hostapd control interface is found duplicated a number of times. Create a common reconnect helper function to avoid code duplication. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Refresh stations list on control interface reconnectMikael Kanstrup2016-10-161-4/+27
| | | | | | | | | Whenever reconnecting the control interface the hostapd station list is unknown as stations might have dropped or connected. Refresh the list of stations used for command completion on cli connect, reconnect and interface change. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Add completion for sta commandMikael Kanstrup2016-10-161-1/+16
| | | | Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Add support for cli history fileMikael Kanstrup2016-10-161-2/+19
| | | | Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* Passive Client TaxonomyDenton Gentry2016-09-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the signature mechanism described in the paper "Passive Taxonomy of Wifi Clients using MLME Frame Contents" published by Denton Gentry and Avery Pennarun. http://research.google.com/pubs/pub45429.html https://arxiv.org/abs/1608.01725 This involves: 1. Add a CONFIG_TAXONOMY compile option. Enabling taxonomy incurs a memory overhead of up to several kilobytes per associated station. 2. If enabled, store the Probe Request and (Re)Associate Request frame in struct sta_info. 3. Implement code to extract the ID of each Information Element, plus selected fields and bitmasks from certain IEs, into a descriptive text string. This is done in a new source file, src/ap/taxonomy.c. 4. Implement a "signature qq:rr:ss:tt:uu:vv" command in hostapd_cli to retrieve the signature. Signatures take the form of a text string. For example, a signature for the Nexus 5X is: wifi4|probe:0,1,127,45,191,htcap:01ef,htagg:03,htmcs:0000ffff,vhtcap:338061b2, vhtrxmcs:030cfffa,vhttxmcs:030cfffa,extcap:00000a0201000040|assoc:0,1,48,45, 221(0050f2,2),191,127,htcap:01ef,htagg:03,htmcs:0000ffff,vhtcap:339071b2, vhtrxmcs:030cfffa,vhttxmcs:030cfffa,extcap:0000000000000040 Signed-off-by: dgentry@google.com (Denton Gentry) Signed-off-by: denny@geekhold.com (Denton Gentry) Signed-off-by: rofrankel@google.com (Richard Frankel) Signed-off-by: richard@frankel.tv (Richard Frankel)
* cli: Share a common tokenize_cmd() implementationJouni Malinen2016-08-061-32/+0
| | | | | | wpa_cli and hostapd_cli had identical copies of this function. Signed-off-by: Jouni Malinen <j@w1.fi>
* cli: Share a common write_cmd() implementationJouni Malinen2016-08-061-30/+0
| | | | | | wpa_cli and hostapd_cli had identical copies of this function. Signed-off-by: Jouni Malinen <j@w1.fi>
* cli: Share a common get_cmd_arg_num() implementationJouni Malinen2016-08-061-18/+0
| | | | | | wpa_cli and hostapd_cli had identical copies of this function. Signed-off-by: Jouni Malinen <j@w1.fi>
* Share a single str_starts() implementationJouni Malinen2016-08-061-6/+0
| | | | | | No need to define this as a static function in multiple files. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use a common license string for hostapd_cli and wpa_cliMikael Kanstrup2016-08-061-39/+2
| | | | | | Move the license strings for hostapd_cli and wpa_cli to common. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Completion for interface commandMikael Kanstrup2016-08-061-1/+41
| | | | | | Implement command completion for interface command Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Completion for disassociate and deauthenticateMikael Kanstrup2016-08-061-2/+60
| | | | | | | | Command completion routine for disassociate and deauthenticate commands implemented. Tracks AP-STA-CONNECTED/AP-STA-DISCONNECTED events for easy station MAC address lookup. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Implement event handlerMikael Kanstrup2016-08-061-0/+43
| | | | | | | | Add an empty event handler in preparation for additional command completion routines that will need to dynamically build parameters based on events received. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* Move parts of wpa_cli to a new common fileMikael Kanstrup2016-08-061-0/+1
| | | | | | | | In preparation for adding further command completion support to hostapd_cli move some cli related utility functions out of wpa_cli into a new common cli file. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Add completion for help commandMikael Kanstrup2016-08-061-1/+35
| | | | | | Implement command completion support for help command. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Replace static usage string with print_help() functionMikael Kanstrup2016-08-061-36/+44
| | | | | | | | Replace the static commands usage string with a print_help() function that reads commands and help text from the array of defined cli commands. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* hostapd_cli: Add command completion supportMikael Kanstrup2016-08-061-54/+145
| | | | | | | | Add command completion support for hostapd_cli. Only completion for available commands and basic building blocks in preparation for per command parameter completion. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* Make driver flags available through control interfaceErik Ljungberg2016-07-231-0/+8
| | | | | | This shows the current set of driver flags in wpa_cli and hostapd_cli. Signed-off-by: Erik Ljungberg <erik.ljungberg@sonymobile.com>
* hostapd: Add FTM range requestDavid Spinadel2016-04-171-0/+13
| | | | | | | | | | | | | | | | | | | | Add FTM range request via RRM. The AP sends Radio measurement request with FTM range request as a request for the receiving STA to send FTM requests to the given list of APs. The neighbor report part of the request is taken from the neighbor database. The control interface command is: REQ_RANGE <dst addr> <rand_int> <min_ap> <responder> [<responder>..] dst addr: MAC address of an associated STA rand_int: Randomization Interval (0..65535) in TUs min_ap: Minimum AP Count (1..15); minimum number of requested FTM ranges between the associated STA and the listed APs responder: List of BSSIDs for neighboring APs for which a measurement is requested Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Add LCI requestDavid Spinadel2016-04-171-0/+21
| | | | | | | Add a hostapd control interface command REQ_LCI to request LCI from an associated station using radio measurement. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Add a database of neighboring APsDavid Spinadel2016-04-161-0/+45
| | | | | | | | | | | | | | | | | Add a configurable neighbor database that includes the content of Nighbor Report element, LCI and Location Civic subelements and SSID. All parameters for a neighbor must be updated at once; Neighbor Report element and SSID are mandatory, LCI and civic are optional. The age of LCI is set to the time of neighbor update. The control interface API is: SET_NEIGHBOR <BSSID> <ssid=SSID> <nr=data> [lci=<data>] [civic=<data>] To delete a neighbor use: REMOVE_NEIGHBOR <BSSID> <SSID> Signed-off-by: David Spinadel <david.spinadel@intel.com>
* PMKSA: Flush AP/mesh PMKSA cache by PMKSA_FLUSH commandMasashi Honma2016-03-201-0/+8
| | | | | | | | | This extends the wpa_supplicant PMKSA_FLUSH control interface command to allow the PMKSA list from the authenticator side to be flushed for AP and mesh mode. In addition, this adds a hostapd PMKSA_FLUSH control interface command to flush the PMKSA entries. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* PMKSA: Show AP/mesh PMKSA list in PMKSA commandMasashi Honma2016-03-201-0/+7
| | | | | | | | | This extends the wpa_supplicant PMKSA control interface command to allow the PMKSA list from the authenticator side to be listed for AP and mesh mode. In addition, this adds a hostapd PMKSA control interface command to show the same list for the AP case. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* hostapd: Add UDP support for ctrl_ifaceJanusz Dziedzic2016-03-051-0/+17
| | | | | | | | | | | | | | | Add UDP support for ctrl_iface: New config option could be set: CONFIG_CTRL_IFACE=udp CONFIG_CTRL_IFACE=udp-remote CONFIG_CTRL_IFACE=udp6 CONFIG_CTRL_IFACE=udp6-remote And hostapd_cli usage: hostapd_cli -i localhost:8877 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd_cli: Add support for RAW commandDedy Lansky2016-02-221-0/+55
| | | | | | | Same as for wpa_cli, RAW command is a passthrough to hostapd control interface. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
* eloop: Add eloop_sock_requeue()Roy Marples2016-02-071-1/+1
| | | | | | | This function can be used to re-build eloop socket tables after forking for eloop implementations that need this. Signed-off-by: Roy Marples <roy@marples.name>
* Update copyright notices for the new year 2016Jouni Malinen2016-01-011-2/+2
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>