aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/wpa_debug.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-31 13:55:33 +0300
committerJouni Malinen <j@w1.fi>2012-03-31 13:55:33 +0300
commit4f68895e923fea3c5aefcca0ae75aa06ac698b9c (patch)
tree58f82cdfe249a20f4bdac38ab2ceefabcc5304b6 /src/utils/wpa_debug.h
parent526ec4aee84ed1ab25930d4445161a02aa5937cb (diff)
downloadexternal_wpa_supplicant_8_ti-4f68895e923fea3c5aefcca0ae75aa06ac698b9c.zip
external_wpa_supplicant_8_ti-4f68895e923fea3c5aefcca0ae75aa06ac698b9c.tar.gz
external_wpa_supplicant_8_ti-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 'src/utils/wpa_debug.h')
-rw-r--r--src/utils/wpa_debug.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h
index c79907a..339c749 100644
--- a/src/utils/wpa_debug.h
+++ b/src/utils/wpa_debug.h
@@ -255,6 +255,24 @@ static inline void wpa_debug_close_syslog(void)
#endif /* CONFIG_DEBUG_SYSLOG */
+#ifdef CONFIG_DEBUG_LINUX_TRACING
+
+int wpa_debug_open_linux_tracing(void);
+void wpa_debug_close_linux_tracing(void);
+
+#else /* CONFIG_DEBUG_LINUX_TRACING */
+
+static inline int wpa_debug_open_linux_tracing(void)
+{
+ return 0;
+}
+
+static inline void wpa_debug_close_linux_tracing(void)
+{
+}
+
+#endif /* CONFIG_DEBUG_LINUX_TRACING */
+
#ifdef EAPOL_TEST
#define WPA_ASSERT(a) \