summaryrefslogtreecommitdiffstats
path: root/contrib/wpa/src/utils/wpa_debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/wpa/src/utils/wpa_debug.h')
-rw-r--r--contrib/wpa/src/utils/wpa_debug.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/contrib/wpa/src/utils/wpa_debug.h b/contrib/wpa/src/utils/wpa_debug.h
index 400bea9..17d8f96 100644
--- a/contrib/wpa/src/utils/wpa_debug.h
+++ b/contrib/wpa/src/utils/wpa_debug.h
@@ -164,6 +164,7 @@ void wpa_hexdump_ascii_key(int level, const char *title, const void *buf,
#define wpa_msg_global(args...) do { } while (0)
#define wpa_msg_global_ctrl(args...) do { } while (0)
#define wpa_msg_no_global(args...) do { } while (0)
+#define wpa_msg_global_only(args...) do { } while (0)
#define wpa_msg_register_cb(f) do { } while (0)
#define wpa_msg_register_ifname_cb(f) do { } while (0)
#else /* CONFIG_NO_WPA_MSG */
@@ -243,7 +244,28 @@ PRINTF_FORMAT(3, 4);
void wpa_msg_no_global(void *ctx, int level, const char *fmt, ...)
PRINTF_FORMAT(3, 4);
-typedef void (*wpa_msg_cb_func)(void *ctx, int level, int global,
+/**
+ * wpa_msg_global_only - Conditional printf for ctrl_iface monitors
+ * @ctx: Pointer to context data; this is the ctx variable registered
+ * with struct wpa_driver_ops::init()
+ * @level: priority level (MSG_*) of the message
+ * @fmt: printf format string, followed by optional arguments
+ *
+ * This function is used to print conditional debugging and error messages.
+ * This function is like wpa_msg_global(), but it sends the output only as a
+ * global event.
+ */
+void wpa_msg_global_only(void *ctx, int level, const char *fmt, ...)
+PRINTF_FORMAT(3, 4);
+
+enum wpa_msg_type {
+ WPA_MSG_PER_INTERFACE,
+ WPA_MSG_GLOBAL,
+ WPA_MSG_NO_GLOBAL,
+ WPA_MSG_ONLY_GLOBAL,
+};
+
+typedef void (*wpa_msg_cb_func)(void *ctx, int level, enum wpa_msg_type type,
const char *txt, size_t len);
/**
@@ -342,4 +364,7 @@ static inline void wpa_debug_close_linux_tracing(void)
#define WPA_ASSERT(a) do { } while (0)
#endif
+const char * debug_level_str(int level);
+int str_to_debug_level(const char *s);
+
#endif /* WPA_DEBUG_H */
OpenPOWER on IntegriCloud