#include "wpabuf.h"
Go to the source code of this file.
Defines | |
#define | HOSTAPD_MODULE_DRIVER 0x00000010 |
#define | HOSTAPD_MODULE_IAPP 0x00000020 |
#define | HOSTAPD_MODULE_IEEE80211 0x00000001 |
#define | HOSTAPD_MODULE_IEEE8021X 0x00000002 |
#define | HOSTAPD_MODULE_MLME 0x00000040 |
#define | HOSTAPD_MODULE_RADIUS 0x00000004 |
#define | HOSTAPD_MODULE_WPA 0x00000008 |
#define | WPA_ASSERT(a) do { } while (0) |
Enumerations | |
enum | { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR } |
enum | hostapd_logger_level { HOSTAPD_LEVEL_DEBUG_VERBOSE = 0, HOSTAPD_LEVEL_DEBUG = 1, HOSTAPD_LEVEL_INFO = 2, HOSTAPD_LEVEL_NOTICE = 3, HOSTAPD_LEVEL_WARNING = 4 } |
Functions | |
void | hostapd_logger (void *ctx, const u8 *addr, unsigned int module, int level, const char *fmt,...) PRINTF_FORMAT(5 |
void | hostapd_logger_register_cb (hostapd_logger_cb_func func) |
void | wpa_debug_close_file (void) |
static void | wpa_debug_close_syslog (void) |
int | wpa_debug_open_file (const char *path) |
static void | wpa_debug_open_syslog (void) |
void | wpa_debug_print_timestamp (void) |
void void | wpa_hexdump (int level, const char *title, const u8 *buf, size_t len) |
void | wpa_hexdump_ascii (int level, const char *title, const u8 *buf, size_t len) |
void | wpa_hexdump_ascii_key (int level, const char *title, const u8 *buf, size_t len) |
static void | wpa_hexdump_buf (int level, const char *title, const struct wpabuf *buf) |
static void | wpa_hexdump_buf_key (int level, const char *title, const struct wpabuf *buf) |
void | wpa_hexdump_key (int level, const char *title, const u8 *buf, size_t len) |
void | wpa_msg (void *ctx, int level, const char *fmt,...) PRINTF_FORMAT(3 |
void void | wpa_msg_ctrl (void *ctx, int level, const char *fmt,...) PRINTF_FORMAT(3 |
void | wpa_msg_register_cb (wpa_msg_cb_func func) |
void | wpa_printf (int level, const char *fmt,...) PRINTF_FORMAT(2 |
Variables | |
void typedef void(* | hostapd_logger_cb_func )(void *ctx, const u8 *addr, unsigned int module, int level, const char *txt, size_t len) |
void void typedef void(* | wpa_msg_cb_func )(void *ctx, int level, const char *txt, size_t len) |
#define HOSTAPD_MODULE_DRIVER 0x00000010 |
Definition at line 211 of file wpa_debug.h.
#define HOSTAPD_MODULE_IAPP 0x00000020 |
Definition at line 212 of file wpa_debug.h.
#define HOSTAPD_MODULE_IEEE80211 0x00000001 |
Definition at line 207 of file wpa_debug.h.
#define HOSTAPD_MODULE_IEEE8021X 0x00000002 |
Definition at line 208 of file wpa_debug.h.
#define HOSTAPD_MODULE_MLME 0x00000040 |
Definition at line 213 of file wpa_debug.h.
#define HOSTAPD_MODULE_RADIUS 0x00000004 |
Definition at line 209 of file wpa_debug.h.
#define HOSTAPD_MODULE_WPA 0x00000008 |
Definition at line 210 of file wpa_debug.h.
#define WPA_ASSERT | ( | a | ) | do { } while (0) |
Definition at line 253 of file wpa_debug.h.
anonymous enum |
Definition at line 23 of file wpa_debug.h.
enum hostapd_logger_level |
HOSTAPD_LEVEL_DEBUG_VERBOSE | |
HOSTAPD_LEVEL_DEBUG | |
HOSTAPD_LEVEL_INFO | |
HOSTAPD_LEVEL_NOTICE | |
HOSTAPD_LEVEL_WARNING |
Definition at line 215 of file wpa_debug.h.
void hostapd_logger | ( | void * | ctx, | |
const u8 * | addr, | |||
unsigned int | module, | |||
int | level, | |||
const char * | fmt, | |||
... | ||||
) |
void hostapd_logger_register_cb | ( | hostapd_logger_cb_func | func | ) |
hostapd_logger_register_cb - Register callback function for hostapd_logger() : Callback function (NULL to unregister)
Definition at line 368 of file wpa_debug.c.
void wpa_debug_close_file | ( | void | ) |
Definition at line 295 of file wpa_debug.c.
static void wpa_debug_close_syslog | ( | void | ) | [inline, static] |
Definition at line 235 of file wpa_debug.h.
int wpa_debug_open_file | ( | const char * | path | ) |
Definition at line 276 of file wpa_debug.c.
static void wpa_debug_open_syslog | ( | void | ) | [inline, static] |
Definition at line 231 of file wpa_debug.h.
void wpa_debug_print_timestamp | ( | void | ) |
wpa_debug_printf_timestamp - Print timestamp for debug output
This function prints a timestamp in seconds_from_1970.microsoconds format if debug output has been configured to include timestamps in debug messages.
Definition at line 36 of file wpa_debug.c.
void void wpa_hexdump | ( | int | level, | |
const char * | title, | |||
const u8 * | buf, | |||
size_t | len | |||
) |
wpa_hexdump - conditional hex dump : priority level (MSG_*) of the message : title of for the message : data buffer to be dumped : length of the buf
This function is used to print conditional debugging and error messages. The output may be directed to stdout, stderr, and/or syslog based on configuration. The contents of buf is printed out has hex dump.
Definition at line 166 of file wpa_debug.c.
void wpa_hexdump_ascii | ( | int | level, | |
const char * | title, | |||
const u8 * | buf, | |||
size_t | len | |||
) |
wpa_hexdump_ascii - conditional hex dump : priority level (MSG_*) of the message : title of for the message : data buffer to be dumped : length of the buf
This function is used to print conditional debugging and error messages. The output may be directed to stdout, stderr, and/or syslog based on configuration. The contents of buf is printed out has hex dump with both the hex numbers and ASCII characters (for printable range) are shown. 16 bytes per line will be shown.
Definition at line 263 of file wpa_debug.c.
void wpa_hexdump_ascii_key | ( | int | level, | |
const char * | title, | |||
const u8 * | buf, | |||
size_t | len | |||
) |
wpa_hexdump_ascii_key - conditional hex dump, hide keys : priority level (MSG_*) of the message : title of for the message : data buffer to be dumped : length of the buf
This function is used to print conditional debugging and error messages. The output may be directed to stdout, stderr, and/or syslog based on configuration. The contents of buf is printed out has hex dump with both the hex numbers and ASCII characters (for printable range) are shown. 16 bytes per line will be shown. This works like wpa_hexdump_ascii(), but by default, does not include secret keys (passwords, etc.) in debug output.
Definition at line 269 of file wpa_debug.c.
static void wpa_hexdump_buf | ( | int | level, | |
const char * | title, | |||
const struct wpabuf * | buf | |||
) | [inline, static] |
Definition at line 79 of file wpa_debug.h.
static void wpa_hexdump_buf_key | ( | int | level, | |
const char * | title, | |||
const struct wpabuf * | buf | |||
) | [inline, static] |
Definition at line 100 of file wpa_debug.h.
void wpa_hexdump_key | ( | int | level, | |
const char * | title, | |||
const u8 * | buf, | |||
size_t | len | |||
) |
wpa_hexdump_key - conditional hex dump, hide keys : priority level (MSG_*) of the message : title of for the message : data buffer to be dumped : length of the buf
This function is used to print conditional debugging and error messages. The output may be directed to stdout, stderr, and/or syslog based on configuration. The contents of buf is printed out has hex dump. This works like wpa_hexdump(), but by default, does not include secret keys (passwords, etc.) in debug output.
Definition at line 172 of file wpa_debug.c.
void wpa_msg | ( | void * | ctx, | |
int | level, | |||
const char * | fmt, | |||
... | ||||
) |
wpa_msg - Conditional printf for default target and ctrl_iface monitors : Pointer to context data; this is the ctx variable registered with struct wpa_driver_ops::init() : priority level (MSG_*) of the message : printf format string, followed by optional arguments
This function is used to print conditional debugging and error messages. The output may be directed to stdout, stderr, and/or syslog based on configuration. This function is like wpa_printf(), but it also sends the same message to all attached ctrl_iface monitors.
Note: New line '
' is added to the end of the text when printing to stdout.
void void wpa_msg_ctrl | ( | void * | ctx, | |
int | level, | |||
const char * | fmt, | |||
... | ||||
) |
wpa_msg_ctrl - Conditional printf for ctrl_iface monitors : Pointer to context data; this is the ctx variable registered with struct wpa_driver_ops::init() : priority level (MSG_*) of the message : printf format string, followed by optional arguments
This function is used to print conditional debugging and error messages. This function is like wpa_msg(), but it sends the output only to the attached ctrl_iface monitors. In other words, it can be used for frequent events that do not need to be sent to syslog.
void wpa_msg_register_cb | ( | wpa_msg_cb_func | func | ) |
wpa_msg_register_cb - Register callback function for wpa_msg() messages : Callback function (NULL to unregister)
Definition at line 311 of file wpa_debug.c.
void wpa_printf | ( | int | level, | |
const char * | fmt, | |||
... | ||||
) |
wpa_printf - conditional printf : priority level (MSG_*) of the message : printf format string, followed by optional arguments
This function is used to print conditional debugging and error messages. The output may be directed to stdout, stderr, and/or syslog based on configuration.
Note: New line '
' is added to the end of the text when printing to stdout.
void typedef void(* hostapd_logger_cb_func)(void *ctx, const u8 *addr, unsigned int module, int level, const char *txt, size_t len) |
Definition at line 196 of file wpa_debug.h.
void void typedef void(* wpa_msg_cb_func)(void *ctx, int level, const char *txt, size_t len) |
Definition at line 178 of file wpa_debug.h.