Commit graph

89 commits

Author SHA1 Message Date
Jouni Malinen
464144a43b edit: Add history buffer search
Ctrl-R can now be used to start history search mode.
2010-11-20 17:55:35 +02:00
Jouni Malinen
42034d6f60 edit: Clean up escape code parser 2010-11-20 16:59:55 +02:00
Jouni Malinen
0bee81352f edit: Split escape code parsing into a separate function
This makes edit_read_char() simpler and easier to extend since it
does not need to know anything about the escape codes anymore.
2010-11-20 15:55:51 +02:00
Jouni Malinen
ef6ee3e5a3 edit: Sort completion list 2010-11-20 12:41:15 +02:00
Jouni Malinen
9364990ace edit: Really fix the completion of last character
The previous commit broke completion in various places. The proper
way of handling the completion of full word is to verify whether
there are more than one possible match at that point.
2010-11-20 12:27:06 +02:00
Jouni Malinen
414780027a edit: Fix completion at the last character
Completion needs to be done even if the full word has been entered.
In addition, fix the space-after-full-word to properly allocate room
for the extra character when completion is used in the middle of the
string.
2010-11-20 11:59:04 +02:00
Jouni Malinen
89eb6b774d edit: Fix delete word to update current position 2010-11-20 11:48:00 +02:00
Jouni Malinen
e4f13f9256 edit: Fix completion of arguments other than the first one 2010-11-20 11:45:42 +02:00
Jouni Malinen
73669f1b03 edit: Fix Home/End escape codes 2010-11-20 11:20:48 +02:00
Jouni Malinen
ef49bb80a9 wlantest: Add interactive mode to wlantest_cli 2010-11-20 10:48:32 +02:00
Jouni Malinen
7302a35ed4 edit: Add string completion support on tab 2010-11-20 00:42:02 +02:00
Jouni Malinen
7d23e971f0 wlantest: Add preliminary infrastructure for injecting frames
This adds new commands for wlantest_cli to request wlantest to
inject frames. This version can only send out Authentication
frames and unprotected SA Query Request frames, but there is
now place to add more frames and encryption with future commits.
2010-11-19 00:35:13 +02:00
Jouni Malinen
e8ecb5fb49 Move wpa_cli readline integration into src/utils/edit_readline.c
All three line editing options are now located in src/utils/edit*.c
and provide the same API to allow easy build time selection.
2010-11-14 22:37:43 +02:00
Jouni Malinen
bdc45634f0 wpa_cli: Use edit API as a wrapper for optional readline 2010-11-14 21:19:35 +02:00
Jouni Malinen
616e0e728e edit: Redraw input line on ^L 2010-11-14 21:03:24 +02:00
Jouni Malinen
82a855bda8 Move command line editing routines into src/utils/edit*.[ch]
This allows the same routines to be shared with other programs
since these are not really specific to wpa_cli.
2010-11-14 20:59:29 +02:00
Jouni Malinen
d96e79f1e7 Make wpa_hexdump_buf{,-key} handle NULL buffer
This matches with behavior of other wpa_hexdump* functions.
2010-10-31 12:09:18 +02:00
Jouni Malinen
b22128efdc P2P: Add initial version of P2P Module 2010-09-09 07:17:17 -07:00
Masashi Honma
60da5e0f3f Solaris: Add support for wired IEEE 802.1X client
This patch adds support for wired IEEE 802.1X client on the Solaris.

I have tested with these:
OS : OpenSolaris 2009.06
EAP : EAP-MD5
Switch : Cisco Catalyst 2950
2010-08-28 11:40:07 +03:00
Masashi Honma
9c77ad1889 trace: Fix void pointer arithmetic
The arithmetic on void pointer exists in trace routine. On GNU C, it
works because void pointer size is 1, but not all compilers behave like
this. So this patch specifies the size of the pointer.
2010-08-26 18:35:55 +03:00
Jouni Malinen
2d8bf73298 Add new debug message level for excessive information
Some frequent debug prints are of limited use and make debug output
difficult to read. Make them use a new debug level so that -dd
provides more readable output (-ddd can now be used to enable
the excessive debug prints).
2010-07-05 12:21:48 -07:00
Jouni Malinen
7f5957abcf eloop: Fix crash on signal handler cancelling next timeout
It is possible that the timeout pointer becomes invalid in one of the
signal handlers, so we need to reload the pointer after those.
2010-05-28 22:18:28 +03:00
Jouni Malinen
7992b07f6a Remove unnecessary SUBDIRS loops from src/*/Makefile
There are no subdirectories in any of these directories or plans
for adding ones. As such, there is no point in running the loop
that does not do anything and can cause problems with some shells.
2010-04-17 17:10:31 +03:00
Jouni Malinen
448a0a19d7 Add a more flexible version of hwaddr_aton: hwaddr_aton2()
This version of the MAC address parser allows number of different
string formats for the address (e.g., 00:11:22:33:44:55, 0011.2233.4455,
001122334455, 00-11-22-33-44-55). It returns the number of characters
used from the input string in case of success.
2010-04-06 10:37:13 +03:00
Jouni Malinen
ade07077ec Add address to hostapd_logger output in wpa_supplicant as AP case 2010-04-04 08:14:09 +03:00
Kel Modderman
09bd6e8cca wpa_supplicant: fix FTBFS on Debian GNU/kFreeBSD
This patch allows wpa_supplicant to compile on Debian's kfreebsd
architectures.

Patch by Stefan Lippers-Hollmann based on work done by Petr Salinger
and Emmanuel Bouthenot for 0.6.X (http://bugs.debian.org/480572).
2010-03-06 10:16:47 +02:00
Jouni Malinen
2e320d8db5 eloop: Clear timeout data during allocation
Better make sure the eloop_timeout data gets fully initialized. The
current code is filling in all the fields, but it is clearer to just
zero the buffer to make sure any new field added to the structure gets
initialized.
2010-01-10 21:48:27 +02:00
Masashi Honma
953f0f6333 bsd: Add support for WPA_TRACE and WPA_TRACE_BFD
On FreeBSD 8.0, WPA_TRACE and WPA_TRACE_BFD functionality build fails.
2010-01-09 11:01:12 +02:00
Jouni Malinen
0de4da91c1 Mark fmt parameter const for wpa_printf/msg 2010-01-04 19:16:19 +02:00
Jouni Malinen
2e8542756c Mark wpabuf_get_trace() static 2009-12-28 16:02:11 +02:00
Jouni Malinen
459489c99d eloop: Fix timeout handler to use local copy of func pointer
We need to copy not only the context pointers, but also the function
pointer before the timeout gets freed.
2009-12-26 14:30:50 +02:00
Jouni Malinen
9aca440199 Drop WPA_TRACE reference before eloop timeout handler call
This avoids bogus error reports for cases where the timeout handler
frees the memory that was pointed to by the eloop timeout context.
2009-12-24 12:41:20 +02:00
Jouni Malinen
1b9eb51bbd Enable IPv6 support for libutils.a and libradius.a 2009-12-24 12:27:42 +02:00
Jouni Malinen
6aa9e7a64a Redesign struct hostapd_ip_addr to be of fixed size
This structure is embedded in some other structures and as such, it
would be nicer if this would not change its length based on build
options.
2009-12-24 12:26:47 +02:00
Jouni Malinen
5e5223bf29 trace: Show eloop unregistered handler function name/file/line 2009-12-22 01:52:48 +02:00
Jouni Malinen
94caf8cd62 trace: Filter out uninteresting functions from backtrace
This filters out the functions inside trace.c and functions before
main() since those are not relevant to the actual issue that is being
reported.
2009-12-22 01:29:15 +02:00
Jouni Malinen
a6ff0e0810 trace: Add active reference tracking
This WPA_TRACE=y additions allows components to register active references
to memory that has been provided to them as a pointer. If such an actively
referenced memory area is freed, tracer will report this as an error and
backtraces of both the invalid free and the location where this pointer
was marked referenced are shown.
2009-12-22 01:11:15 +02:00
Jouni Malinen
a698d28415 Check fread return value 2009-12-21 23:17:53 +02:00
Jouni Malinen
f2f7d965b8 Add option libbfd support for tracing code
CONFIG_WPA_TRACE=y and CONFIG_WPA_TRACE_BFD=y can now be used to get
even more complete symbols (func/file/line and inline functions) for
backtraces.
2009-12-20 23:35:06 +02:00
Jouni Malinen
f266d1a162 eloop_win: Fix build after eloop user_data removal 2009-12-20 17:48:55 +02:00
Jouni Malinen
eeb04821ad wpabuf: Add WPA_TRACE code to validate correct freeing of wpabuf
Use an extra header to move the returned pointer to break os_free()
or free() of the returned value and verify that the correct magic
is present when freeing or resizing the wpabuf. Show backtrace on
invalid wpabuf use.
2009-12-20 13:11:31 +02:00
Jouni Malinen
859db534bf wpabuf: Allow wpabuf_resize(NULL, len) to be used
This matches with realloc() usage, i.e., allocate a new buffer if no
buffer was specified.
2009-12-20 12:52:54 +02:00
Jouni Malinen
fb4baa688b Add memory allocation analyzer to verify OS wrapper use
WPA_TRACE=y builds will now verify that memory allocation in done
consistently using os_{zalloc,malloc,realloc,strdup,free} (i.e., no
mixing of os_* functions and unwrapper functions). In addition, some
common memory allocation issues (double-free, memory leaks, etc.) are
detected automatically.
2009-12-19 21:47:56 +02:00
Jouni Malinen
f45fb672cc eloop: Do not use printf() or fprintf() directly 2009-12-19 20:27:55 +02:00
Jouni Malinen
eaa3f04b97 eloop: Use struct dl_list for timeouts 2009-12-19 20:26:22 +02:00
Jouni Malinen
0456ea16d8 eloop: Remove global user data pointer
This is not really needed since all signal handlers can use a context
pointer provided during signal handler registration.
2009-12-19 19:22:16 +02:00
Jouni Malinen
930f704aac Add backtrace support for debugging
WPA_TRACE=y can now be used to enable internal backtrace support that
will provide more details about implementation errors, e.g., when some
resources are not released correctly. In addition, this will print out
a backtrace automatically if SIGSEGV is received.
2009-12-19 18:40:54 +02:00
Jouni Malinen
dacf478352 Add generic doubly-linked list implementation 2009-12-19 13:43:25 +02:00
Jouni Malinen
1a70777868 Remove unneeded CONFIG_INTERNAL_X509 and NEED_SHA256 defines 2009-12-06 16:19:13 +02:00
Jouni Malinen
4bb1228e1c Use thin archives to allow libraries to be merged
This allows libeap.a and libeap.so to be built by merging in multiple
libraries from src subdirectories. In addition, this avoids wasting
extra space and time for local builds.
2009-12-06 13:49:31 +02:00