aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-31 10:55:33 (GMT)
committerJouni Malinen <j@w1.fi>2012-03-31 10:55:33 (GMT)
commit4f68895e923fea3c5aefcca0ae75aa06ac698b9c (patch)
tree58f82cdfe249a20f4bdac38ab2ceefabcc5304b6 /wpa_supplicant/main.c
parent526ec4aee84ed1ab25930d4445161a02aa5937cb (diff)
downloadhostap-4f68895e923fea3c5aefcca0ae75aa06ac698b9c.zip
hostap-4f68895e923fea3c5aefcca0ae75aa06ac698b9c.tar.gz
hostap-4f68895e923fea3c5aefcca0ae75aa06ac698b9c.tar.bz2
debug: Add option to log to Linux tracing
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>
Diffstat (limited to 'wpa_supplicant/main.c')
-rw-r--r--wpa_supplicant/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
index c124ca2..bde956e 100644
--- a/wpa_supplicant/main.c
+++ b/wpa_supplicant/main.c
@@ -61,6 +61,10 @@ static void usage(void)
#ifdef CONFIG_DEBUG_SYSLOG
printf(" -s = log output to syslog instead of stdout\n");
#endif /* CONFIG_DEBUG_SYSLOG */
+#ifdef CONFIG_DEBUG_LINUX_TRACING
+ printf(" -T = record to Linux tracing in addition to logging\n");
+ printf(" (records all messages regardless of debug verbosity)\n");
+#endif /* CONFIG_DEBUG_LINUX_TRACING */
printf(" -t = include timestamp in debug messages\n"
" -h = show this help text\n"
" -L = show license (BSD)\n"
@@ -139,7 +143,8 @@ int main(int argc, char *argv[])
wpa_supplicant_fd_workaround();
for (;;) {
- c = getopt(argc, argv, "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qstuvW");
+ c = getopt(argc, argv,
+ "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qsTtuvW");
if (c < 0)
break;
switch (c) {
@@ -214,6 +219,11 @@ int main(int argc, char *argv[])
params.wpa_debug_syslog++;
break;
#endif /* CONFIG_DEBUG_SYSLOG */
+#ifdef CONFIG_DEBUG_LINUX_TRACING
+ case 'T':
+ params.wpa_debug_tracing++;
+ break;
+#endif /* CONFIG_DEBUG_LINUX_TRACING */
case 't':
params.wpa_debug_timestamp++;
break;