aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* Add os_exec() helper to run external programsJouni Malinen2015-10-203-0/+68
| | | | | | Change-Id: I579af1fa8c2f85622ffddb186ba799dcb9ac4b6f Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Tested-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* Add WPA_UNICODE_SSID supportDmitry Shmidt2012-08-021-0/+2
| | | | | Change-Id: I1f938b97169d4468ee5b05316826ee509a10d9ad Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* eloop: Fix EVENT_TYPE_WRITE with poll()-based eloopJouni Malinen2012-07-041-1/+1
| | | | | | This needs to use POLLOUT instead of POLLIN to get the correct event. Signed-hostap: Jouni Malinen <j@w1.fi>
* eloop/poll: Handle POLLER | POLLHUP in read logicBen Greear2012-06-241-1/+2
| | | | | | | | | | | Without this, we can get into a tight loop because the code in general doesn't add eloop exception handlers, so socket reporting the POLLERR would never be read. With this change, any socket with POLLERR or POLLHUP asserted will be handled by the read logic. Signed-hostap: Ben Greear <greearb@candelatech.com>
* Fix compiler warning on printf format with size_tJouni Malinen2012-04-281-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove experimental Symbian buildJouni Malinen2012-04-073-40/+0
| | | | | | | This was never really completed and is of not much use at this point, so clean up the repository by removing the Symbian-specific changes. Signed-hostap: Jouni Malinen <j@w1.fi>
* debug: Add option to log to Linux tracingJohannes Berg2012-03-312-0/+150
| | | | | | | | | | | | Add the option (-T) to wpa_supplicant to log all debug messages into the kernel tracing, allowing to aggregate kernel debugging with wpa_supplicant debugging and recording all with trace-cmd. Since tracing has relatively low overhead and can be filtered afterwards, record all messages regardless of log level. However, it will honor the -K option and not record key material by default. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Fix eapol_test build without CONFIG_PCSC=yJouni Malinen2012-03-291-1/+2
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Interworking: Use EAP-AKA if USIM is usedJouni Malinen2012-03-042-0/+8
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* SCARD: Increase application template DO buffer sizeJouni Malinen2012-03-031-1/+1
| | | | | | | This DO has a maximum length of 127 bytes (TS 102 221), so better use large enough buffer when reading the record. Signed-hostap: Jouni Malinen <j@w1.fi>
* SCARD: Move SIM file definitions into the C fileJouni Malinen2012-03-032-20/+21
| | | | | | | These are used only within pcsc_funcs.c so no need to define the file identifiers in the header file. Signed-hostap: Jouni Malinen <j@w1.fi>
* SCARD: Add function for fetching PIN retry counterJouni Malinen2012-03-032-2/+45
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* SCARD: Add debug dumps of FCP template TLVs in SELECT responseJouni Malinen2012-03-031-16/+65
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* SCARD: Reindent scard_parse_fsp_templ()Jouni Malinen2012-03-031-52/+51
| | | | | | | This was left at incorrect indentation level when moved to a separate function. Signed-hostap: Jouni Malinen <j@w1.fi>
* pcsc: Allow T1 protocol to be enabledJouni Malinen2012-02-261-1/+2
| | | | | | | The previous implementation was hardcoding only T0 protocol to be acceptable. Allow T1 to be selected, too. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow PC/SC reader to be selected and initialized at startJouni Malinen2012-02-262-11/+34
| | | | | | | New global configuration parameters pcsc_reader and pcsc_pin can now be used to initialize PC/SC reader context at start of wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* Android: Extend debug logging to include wpa_dbg and hexdumpJouni Malinen2012-02-182-45/+59
| | | | | | | This makes the Android debug logs from logcat quite a bit more helpful in debugging wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* eloop: Fix allocation failure handling in poll() versionJouni Malinen2012-02-121-21/+31
| | | | | | | eloop_sock_table_add_sock() needs to fail if pollfd array allocation fails instead of returning success and leaving behind no buffer. Signed-hostap: Jouni Malinen <j@w1.fi>
* eloop: Support poll() in eloopBen Greear2012-02-121-1/+227
| | | | | | | | When using more than around 200 virtual stations, we start hitting the max number of file descriptors supported by select(). This patch adds support for poll(), which has no hard upper limit. Signed-hostap: Ben Greear <greearb@candelatech.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-1133-264/+66
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_debug: Support outputting hexdumps into syslogNicolas Cavallari2012-01-291-0/+32
| | | | | | | | | This patch allows to log hexdumps into syslog. This is useful when testing, as syslog's network logging helps to collect debug outputs from several machines. Signed-hostapd: Nicolas Cavallari <cavallar@lri.fr>
* pcsc: Fix compiler warning on signed vs. unsigned comparisonJouni Malinen2012-01-251-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* SIM/USIM: Add function to get the MNC length from the SIM/USIMSimon Baatz2012-01-222-0/+57
| | | | | | | | | The EF-AD (administrative data) file may contain information about the length of the MNC (2 or 3 digits) in the IMSI. This can be used to construct the realm according to 3GPP TS 23.003 during EAP-SIM or EAP-AKA authentication. Signed-hostap: Simon Baatz <gmbnomis@gmail.com>
* PCSC: Accept 0x67 (Wrong length) as a response to READ RECORDJouni Malinen2011-12-181-1/+1
| | | | | | | | | | It looks like some USIM cards respond with 0x67 (Wrong length) instead of 0x6c to 00 b2 01 04 ff. This was getting rejected in scard_get_record_len(). ETSI TS 102 221 is not very clear on this detail, but it looks fine to accept the 0x67 error value, too, to learn the record length. Signed-hostap: Jouni Malinen <j@w1.fi>
* Avoid possible compiler warning in os_gmtime()Jouni Malinen2011-11-203-3/+6
| | | | | | | Use time_t instead of os_time_t variable with the gmtime() call to avoid possible compiler warnings. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Implement noack policy for send_mlmeHelmut Schaa2011-11-191-0/+1
| | | | Signed-hostap: Helmut Schaa <helmut.schaa@googlemail.com>
* Use NULL instead of 0 for pointersJouni Malinen2011-11-181-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Include list.h after trace.h to avoid offsetof refinitionJouni Malinen2011-11-181-1/+1
| | | | | | | trace.h may end up including system header files that define offsetof, so include the compatibility definition from list.h only after this. Signed-hostap: Jouni Malinen <j@w1.fi>
* Include time.h to fix Windows buildsJouni Malinen2011-11-031-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* dl_list: Add DEFINE_DL_LISTJohannes Berg2011-10-281-0/+3
| | | | This allows statically defining an empty initialised list.
* Remove unused variable from os_gmtime()Jouni Malinen2011-10-233-6/+0
|
* Set ANDROID_LOG_NAME depending on applicationDmitry Shmidt2011-10-211-1/+5
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Add os_gmtime() as wrapper for gmtime()Jouni Malinen2011-10-185-0/+72
|
* base64: Stop decoding at the first sequence of pad charactersJouni Malinen2011-10-161-10/+17
| | | | | | | The base64 encoded data cannot included pad characters in the middle, so we can stop the loop at the first sequence of pad characters. If the sequence includes more than two pad characters, the encoding is invalid and we can indicate failure.
* edit: Fix history prev/next selectionJouni Malinen2011-10-151-6/+23
| | | | | | | Commit 19ec1f262e67fe7094365d53ee177f900afdaad5 tried to fix some cases for history prev selection, but it broke others. Fix this properly by using a separate entry for the current edit line that is not yet in history buffer.
* Fix typos found by codespellPavel Roskin2011-09-221-1/+1
| | | | Signed-off-by: Pavel Roskin <proski@gnu.org>
* Remove time.h include from utils/includes.hJouni Malinen2011-09-122-1/+2
| | | | | | | | | os_*() wrappers should be used instead of functions from time.h. Removing the header from includes.h enforces this. os_unix.c can include this its uses are valid wrapper calls. wps_upnp.c uses gmtime() for which there is no os_*() wrapper available yet, so allow it to use time.h, too. Similarly, allow dump_state.c to use time.h for ctime().
* Add a copyright and license statement for a radiotap header fileJouni Malinen2011-06-231-0/+15
| | | | | | | This file is a part of the radiotap parser that Andy Green agreed to relicense under the BSD license (per email, 11 Aug 2007 07:42:05 +0100). The copyright/license statement was updated in radiotap.c, but this radiotap_iter.h file was forgotten at that point.
* Add sanity checks for fseek and ftell return valuesJouni Malinen2011-04-141-3/+10
| | | | | | In theory, these calls could fail, but it is not really likely to happen in practice in the use case here. Anyway, check that they do not return an error before accepting the length of the file.
* Add support for setting the syslog facility from the config fileSam Leffler2011-03-201-1/+5
| | | | This enables setting the syslog facility at build time.
* TDLS: Add initial support for TDLS (IEEE Std 802.11z-2010)Ganesh Prasadh2011-03-061-0/+3
|
* Add defines for Valgrind client requestsJouni Malinen2011-03-061-0/+7
| | | | | | | CFLAGS += -DCONFIG_VALGRIND can now be used to enable support for Valgrind client requests to help in removing some non-issues from Valgrind reports. This is mainly aimed at allowing unknown ioctl results to be marked as defined data.
* eloop: Fix integer overflow in long timeoutsJouni Malinen2011-03-062-0/+24
| | | | | | | | | If the os_time_t variable used for the expiration time (seconds) overflows when the registered timeout value is being added, assume that the event would happen after an infinite time, i.e., would not really happen in practice. This fixes issues with long key timeouts getting converted to immediate expiration due to the overflow.
* Add CONFIG_ANDROID_LOG supportDmitry Shmidt2011-02-252-0/+53
| | | | | This makes wpa_printf() calls use __android_log_vprint(). In addition, hexdumps are commented out.
* Change executable permissions for AndroidDmitry Shmidt2011-02-251-0/+30
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* utils: Corrected a typo in header's name definitionGuy Eilam2011-02-211-1/+1
| | | | | | | Corrected a typo in the BASE64_H definition that might cause the header file to be included more than once. Signed-off-by: Guy Eilam <guy@wizery.com>
* Fix CONFIG_NO_STDOUT_DEBUG=y buildJouni Malinen2011-02-102-3/+11
|
* Use wpa_msg() instead of wpa_printf()Ben Greear2011-02-101-0/+9
| | | | | | | | | | This converts number of debugging messages to use wpa_msg() in order to allow the interface name to be shown with the messages. A new function, wpa_dbg(), is introduced to allow CONFIG_NO_STDOUT_DEBUG=y builds to remove the debug strings. This is otherwise identical with wpa_msg(), but it gets compiled out if stdout debugging is disabled.
* Add interface name to wpa_msg() outputBen Greear2011-02-062-2/+24
| | | | | | | | | | This makes log files much more readable if multiple interfaces are being controlled by the same process. The interface name is added to stdout/file/syslog entries, but not to the messages sent to control interface monitors to avoid issues with parsing in external programs. Signed-off-by: Ben Greear <greearb@candelatech.com>
* wpa_supplicant: Support 'relog' command to re-open log filesBen Greear2011-02-062-0/+35
| | | | | | | | | This allows rolling log files: mv log.txt log.txt.1 wpa_cli relog Signed-off-by: Ben Greear <greearb@candelatech.com>