path: root/wpa_supplicant/wpa_cli.c
Commit message (Collapse)AuthorAgeFilesLines
* mesh: Add wpa_cli action script processing for mesh eventsMasashi Honma2014-11-161-0/+8
| | | | | Signed-off-by: Natsuki Itaya <Natsuki.Itaya@jp.sony.com> Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* Add mesh_group_{add,remove} control interface commandsJavier Lopez2014-11-161-0/+26
| | | | | | | | | | | | | Parse MESH_GROUP_ADD/REMOVE commands on ctrl interface and call wpa_supplicant routines. These commands are used to start or join and leave a mesh network. The mesh id is given in the configuration file, therefore there is no need to scan before joining a mesh network. We reuse the connect_without_scan construct used by P2P for that same purpose. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Javier Lopez <jlopex@gmail.com>
* wpa_supplicant: Allow OpenSSL cipherlist string to be configuredJouni Malinen2014-10-121-1/+2
| | | | | | | | | | | The new openssl_cipher configuration parameter can be used to select which TLS cipher suites are enabled for TLS-based EAP methods when OpenSSL is used as the TLS library. This parameter can be used both as a global parameter to set the default for all network blocks and as a network block parameter to override the default for each network profile. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_cli: Use os_exec() for action script executionJouni Malinen2014-10-091-17/+8
| | | | | | | | | Use os_exec() to run the action script operations to avoid undesired command line processing for control interface event strings. Previously, it could have been possible for some of the event strings to include unsanitized data which is not suitable for system() use. (CVE-2014-3686) Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add PMKSA_FLUSH ctrl_iface commandAhmad Kholaif2014-09-271-0/+10
| | | | | | | "PMKSA_FLUSH" can now be used to flush PMKSA cache entries over the control interface. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_cli: Support action scripts with global ctrl_ifaceJouni Malinen2014-09-261-15/+29
| | | | | | | | | | This extends "wpa_cli -a<action script>" functionality to work with the global wpa_supplicant control interface. The IFNAME=<ifname> prefix is removed from the event messages and converted to the control interface name when present. Previously, action scripts could only be used with the per-interface control interfaces. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_cli: Increase event buffer size to 4096 bytesJouni Malinen2014-09-261-1/+1
| | | | | | | | | | | Number of other buffers were already increased to this size, but the buffer used for receiving unsolicited event messages from wpa_supplicant (e.g., for wpa_cli action scripts) was still at the older 256 byte size. This could result in some events getting truncated. Avoid this by using the same 4096 byte buffer size here as in the other places receiving messages from wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_cli: Fix PING in interactive mode with ifname_prefixJouni Malinen2014-09-261-4/+12
| | | | | | | | | | | The ifname_prefix string could change during line editing and the periodic PING command running in the background ended up getting the latest snapshot of the command line due to the pointer being left to point to the edit buffer. This resulted in unexpected prefix strings getting used with the periodic PING command. Fix this by temporarily clearing the ifname_prefix whenever running such a periodic PING. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Make the default p2p_find delay value configurableNirav Shah2014-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the p2p_find default delay value configurable as p2p_search_delay parameter through the configuration file (and through control interface "SET p2p_search_delay <value>" on the P2P management interface. This parameter controls the number milliseconds of extra delay that is added between search iterations when there is a concurrent operation in progress. This can be used, e.g., p2p_search_delay=100 to make p2p_find friendlier to concurrent operations by avoiding it from taking 100% of the radio resources. The default value is the previous default, i.e., 500 ms. Smaller values can be used to find peers more quickly at the cost of larger effect to concurrent operations while a larger value leaves more time for the concurrent operations at the cost of making device discovery take longer time. The optional p2p_find delay argument can still be used to override the search delay for each search operation. Since the P2P_CONCURRENT_SEARCH_DELAY macro is not used anymore, the driver specific build parameter for bcmdhd from Android.mk is also removed. Similar configuration can now be achieved with p2p_search_delay=0 in the p2p0 interface configuration file. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add 'dup_network <id_s> <id_d> <name>' commandDmitry Shmidt2014-05-121-0/+22
| | | | | | | | This command allows to copy network variable from one network to another, e.g., to clone the psk field without having to extract it from wpa_supplicant. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* wpa_cli: Fix wrong comparison in wpa_cli_cmd_interfaceDaichi Ueura2014-04-111-1/+1
| | | | Signed-off-by: Daichi Ueura <daichi.ueura@gmail.com>
* WPS NFC: Remove NFC_RX_HANDOVER_SELJouni Malinen2014-04-061-29/+0
| | | | | | | | | | | The newer NFC_REPORT_HANDOVER command is more general version that handles the cases where NFC_RX_HANDOVER_SEL could potentially have been used. In addition, with the new WPS NFC design, it is important to receive the handover request message that was used in the handover in addition to the select message, so the NFC_RX_HANDOVER_SEL command on its own would not be sufficient for this. Signed-off-by: Jouni Malinen <j@w1.fi>
* Move DROP_SA command to be within ifdef CONFIG_TESTING_OPTIONSJouni Malinen2014-04-051-0/+4
| | | | | | This is a test command and has no use in production builds. Signed-off-by: Jouni Malinen <j@w1.fi>
* Interworking: Add GET_CRED ctrl_iface commandJouni Malinen2014-04-041-0/+15
| | | | | | | | | | | "GET_CRED <id> <field>" can now be used to fetch credential parameters over the control interface. This does not allow passwords etc. private material to be retrieved ("*" is returned for those if the value is set regardless of the value). FAIL is returned if the requested parameter has not been set. For cred parameters that can have multiple values, newline separated list of values is returned. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add a reattach command for fast reassociate-back-to-same-BSSPeter Qiu2014-03-111-0/+9
| | | | | | | | | | | | | Add "reattach" command to perform single-channel single-ssid scan instead of full scan when trying to reconnect to the currently "connected" network (assuming old scan results are not current enough to skip the scan completely). This allows the scan result to come back in much faster time. In ath9k, the scan took around 12 seconds with full background scan, and only 0.1 second with the single-channel single-ssid scan. Thus, take much less time for the client to re-establish connection with the currently "connected" network. Signed-hostap: Peter Qiu <zqiu@chromium.org>
* nl80211: Add vendor command supportBeni Lev2014-03-041-0/+9
| | | | | | | | | | | | | | | | | | Add a callback to the driver interface that allows vendor specific commands to be sent. In addition, a control interface command is added to expose this new interface outside wpa_supplicant: Vendor command's format: VENDOR <vendor id> <sub command id> [<hex formatted data>] The 3rd argument will be converted to binary data and then passed as argument to the sub command. This interface is driver independent, but for now, this is only implemented for the nl80211 driver interface using the cfg80211 vendor commands. Signed-off-by: Beni Lev <beni.lev@intel.com>
* HS 2.0R2: Add routine for fetching OSU provider informationJouni Malinen2014-02-251-0/+18
| | | | | | | | | The new wpa_cli fetch_osu command can be used to fetch information about all OSU providers and write that to a text file with the icons in separate files. cancel_osu_fetch command can be used to stop ongoing OSU provider list fetch. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* HS 2.0R2: Add Icon Request and Icon binary File ANQP elementsJouni Malinen2014-02-251-0/+21
| | | | | | | | wpa_supplicant can request OSU icon data with "hs20_icon_request <BSSID> <icon filename>". This transmits an Icon Request ANQP element and processes the response in Icon Binary File ANQP elements. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* HS 2.0R2: Add STA support for Deauthentication Request notificationJouni Malinen2014-02-251-0/+2
| | | | | | | If requested, disable the network based on the HS 2.0 deauthentication request. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* HS 2.0R2: Add WNM-Notification Request for Subscription RemediationJouni Malinen2014-02-251-0/+2
| | | | | | | | Subscription remediation notification WNM-Notification Request is now shown in the following way in wpa_supplicant control interface: <3>HS20-SUBSCRIPTION-REMEDIATION http://example.com/foo/ Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove unused NFC_RX_HANDOVER_REQJouni Malinen2014-02-151-29/+0
| | | | | | | | The more generic NFC_REPORT_HANDOVER is now used to report completed NFC connection handover operations in either role and NFC_RX_HANDOVER_REQ did not have any implementation within wpa_supplicant. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_cli: Add tdls_external_control to tab completion for SETNaresh Jayaram2014-01-301-1/+2
| | | | | | | | This global configuration parameter was added in commit 800d58721c8a5721d1ddb1271093350ab769ade0 but the tab completion list for the wpa_cli SET command in interactive mode was not updated. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Update copyright notices for the new year 2014Jouni Malinen2014-01-071-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow external programs to request wpa_radio work itemsJouni Malinen2014-01-071-0/+8
| | | | | | | | | | | | The new control interface command RADIO_WORK can be used by external programs to request radio allocation slots from wpa_supplicant if exclusive radio control is needed, e.g., for offchannel operations. If such operations are done directly to the driver, wpa_supplicant may not have enough information to avoid conflicting operations. This new command can be used to provide enough information and radio scheduling to avoid issues with such cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* Android: Add driver_cmd for arbitrary driver commandsJouni Malinen2013-11-221-0/+12
| | | | | | | | | This is a mechanism used in Android to extend driver interface in vendor specific ways. This is included only for the purpose of Android compatibility. Proper interface commands should be used for any new functionality. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add chan_switch to ctrl interface of wpa_supplicant and hostapdAndrei Otcheretianski2013-11-171-0/+12
| | | | | | | Add chan_switch to the control interface of wpa_supplicant and hostapd, and also to wpa_cli and hostapd_cli. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* P2P: Add VHT parameter to P2P operationsEliad Peller2013-10-271-0/+1
| | | | | | | | | | | | Add the option to ask for VHT operation similarly to the way ht40 is configured - either by adding 'vht' param to the relevant p2p_* commands or by configuring p2p_go_vht=1 in the configuration file. This patch only adds the configuration option (e.g., via control interface). The actual handling of the VHT parameter (asking the driver to use VHT, etc.) will be done by the following patch. Signed-hostap: Eliad Peller <eliadx.peller@intel.com>
* P2P: Add option to remove channels from GO useJouni Malinen2013-10-261-0/+1
| | | | | | | | | | | | | The new p2p_no_go_freq frequency range list (comma-separated list of min-max frequency ranges in MHz) can now be used to configure channels on which the local device is not allowed to operate as a GO, but on which that device can be a P2P Client. These channels are left in the P2P Channel List in GO Negotiation to allow the peer device to select one of the channels for the cases where the peer becomes the GO. The local end will remove these channels from consideration if it becomes the GO. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Use ARRAY_SIZE() macroJouni Malinen2013-10-261-3/+3
| | | | | | | Replace the common sizeof(a)/sizeof(a[0]) constructions with a more readable version. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP peer: Add framework for external SIM/USIM processingJouni Malinen2013-10-201-1/+36
| | | | | | | | | | | | | | The new configuration parameter external_sim=<0/1> can now be used to configure wpa_supplicant to use external SIM/USIM processing (e.g., GSM authentication for EAP-SIM or UMTS authentication for EAP-AKA). The requests and responses for such operations are sent over the ctrl_iface CTRL-REQ-SIM and CTRL-RSP-SIM commands similarly to the existing password query mechanism. Changes to the EAP methods to use this new mechanism will be added in separate commits. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add driver status information to control interfaceJouni Malinen2013-09-281-0/+2
| | | | | | | | STATUS-DRIVER command can now be used to fetch driver interface status information. This is mainly for exporting low-level driver interface information for debug purposes. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add a command for removing a client from all groupsJouni Malinen2013-09-011-0/+10
| | | | | | | | | | The new control interface command P2P_REMOVE_CLIENT <P2P Device Address|iface=Address> can now be used to remove the specified client from all groups (ongoing and persistent) in which the local device is a GO. This will remove any per-client PSK entries and deauthenticate the device. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Allow per-device PSK to be assignedJouni Malinen2013-09-011-0/+1
| | | | | | | | | | | | | | | "wpa_cli p2p_set per_sta_psk <0/1>" can now be used to disable/enable use of per-device PSKs in P2P groups. This is disabled by default. When enabled, a default passphrase is still generated by the GO for legacy stations, but all P2P and non-P2P devices using WPS will get a unique PSK. This gives more protection for the P2P group by preventing clients from being able to derive the unicast keys used by other clients. This is also a step towards allowing specific clients to be removed from a group reliably without having to tear down the full group to do so. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Add tab completion for p2p_set field valuesJouni Malinen2013-08-311-1/+45
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Allow first DISCONNECTED event to be reportedJouni Malinen2013-08-311-2/+2
| | | | | | | | | | wpa_cli filters out extra DISCONNECTED events from action scripts. This ended up filtering out the first real DISCONNECT event in case wpa_cli was started when wpa_supplicant was in connected state. Change wpa_cli to allow the first disconnection event to be reported to the action script in such case. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Support tab completion with ifname= prefixJouni Malinen2013-05-231-1/+63
| | | | | | | | | Enable tab completion for the cases where ifname= prefix is used in interactive mode by skipping over that prefix before running through the per-command completion routines. The ifname= prefix itself is also covered by adding the possible interface names to the command list. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Allow IFNAME= prefix to be usedJouni Malinen2013-05-231-1/+18
| | | | | | | | | | Strip out the IFNAME=<ifname> prefix from commands before parsing them through the normal processing and then add the prefix back to the beginning of the actual control interface command to make per-interface commands work through the global control interface without having to use the 'raw' command. Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Make ESS Disassoc Imminent event more convenient to useJouni Malinen2013-05-231-0/+2
| | | | | | | | Define a proper event prefix and include additional information to allow ESS Dissassociation Imminent event to be used in a wpa_cli action script. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow global ctrl_iface monitorsJouni Malinen2013-05-181-0/+17
| | | | | | | | | | The ATTACH/DETACH mechanism to request event messages from wpa_supplicant can now be used through the global control interface, too. This results in events from all interfaces being delivered through a single monitor socket. "IFNAME=<ifname> " prefix is used on events that are specific to an interface. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Set buffer length the same as in wpa_supplicant_ctrl_iface_process()Dmitry Shmidt2013-05-181-1/+1
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* wpa_cli: Allow global interface to be used in interactive modeJouni Malinen2013-05-181-0/+4
| | | | | | | | | This is mostly a corner case at this point, but if wpa_cli was started with global control interface connection (-g) and interactive mode, per-interface control interface was tried to be opened with the previously opened global ctrl_iface connection gettign leaked. Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Add sending of BSS Transition Management QueryVinayak Kamath2013-05-161-0/+8
| | | | | | | The new control interface command can be used to send a BSS Transition Management Query frame to the current AP. Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>
* wpa_cli: Fetch the current BSSID list when starting interactive modeJouni Malinen2013-05-051-0/+33
| | | | | | | This makes tab completion work better in cases where wpa_cli is started after wpa_supplicant has already discovered BSSes. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Add BSSID tab completion for set bssid_filterJouni Malinen2013-05-051-0/+3
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Replace set command help with completion routineJouni Malinen2013-05-051-26/+58
| | | | | | | | The old help text did not include most of the parameters and as such, was not really helpful. Replace it with tab completion function that includes more or less all available parameters. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_cli: Allow space in the set command valueJouni Malinen2013-05-051-14/+8
| | | | | | | | Previously, interactive mode could not be used to enter space-separated lists with the set command. This removes that restriction and allows such commands to be encoded properly. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add dup_binstr() to help common binary string tasksJouni Malinen2013-04-271-6/+2
| | | | | | | | There are quite a few places in the current implementation where a nul terminated string is generated from binary data. Add a helper function to simplify the code a bit. Signed-hostap: Jouni Malinen <j@w1.fi>
* NFC: Increase wpa_cli command buffer sizeJouni Malinen2013-04-271-1/+1
| | | | | | | NFC connection handover messages may be longer than 100 octets, so increase wpa_cli buffer size to allow longer messages to be reported. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_supplicant: Add get_capability freqBruno Randolf2013-04-231-1/+1
| | | | | | | | | | | | | Add "get_capability freq" command to print a more verbose list of channels and frequencies in MHz. The tag "NO_IBSS" is added, if IBSS mode is not allowed on a channel. This allows userspace programs to get the frequencies and limitations associated with each channel. This extends the information already provided in "get_capability channels" but a new interface is chosen because of backwards compatibility considerations. Signed-hostap: Bruno Randolf <br1@einfach.org>
* Add ctrl_iface command FLUSH for clearing wpa_supplicant stateJouni Malinen2013-03-311-0/+8
| | | | | | | This is mainly for testing purposes where it is convenient to have an easy way of getting wpa_supplicant state cleared between test cases. Signed-hostap: Jouni Malinen <j@w1.fi>