Declare wpa_debug_* variables in src/utils/wpa_debug.h
These were somewhat more hidden to avoid direct use, but there are now numerous places where these are needed and more justification to make the extern int declarations available from wpa_debug.h. In addition, this avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
fcc61230d1
commit
0187c41d88
27 changed files with 4 additions and 73 deletions
|
@ -23,8 +23,6 @@ void eap_example_server_deinit(void);
|
||||||
int eap_example_server_step(void);
|
int eap_example_server_step(void);
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int res_s, res_p;
|
int res_s, res_p;
|
||||||
|
|
|
@ -29,11 +29,6 @@
|
||||||
#include "ctrl_iface.h"
|
#include "ctrl_iface.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
extern int wpa_debug_timestamp;
|
|
||||||
|
|
||||||
|
|
||||||
struct hapd_global {
|
struct hapd_global {
|
||||||
void **drv_priv;
|
void **drv_priv;
|
||||||
size_t drv_count;
|
size_t drv_count;
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "radius/radius.h"
|
#include "radius/radius.h"
|
||||||
#include "radius/radius_client.h"
|
#include "radius/radius_client.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
struct radius_ctx {
|
struct radius_ctx {
|
||||||
struct radius_client_data *radius;
|
struct radius_client_data *radius;
|
||||||
struct hostapd_radius_servers conf;
|
struct hostapd_radius_servers conf;
|
||||||
|
|
|
@ -41,8 +41,6 @@ static int hostapd_broadcast_wep_clear(struct hostapd_data *hapd);
|
||||||
static int setup_interface2(struct hostapd_iface *iface);
|
static int setup_interface2(struct hostapd_iface *iface);
|
||||||
static void channel_list_update_timeout(void *eloop_ctx, void *timeout_ctx);
|
static void channel_list_update_timeout(void *eloop_ctx, void *timeout_ctx);
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
||||||
int (*cb)(struct hostapd_iface *iface,
|
int (*cb)(struct hostapd_iface *iface,
|
||||||
|
|
|
@ -125,8 +125,6 @@ static void tls_log_func(int level, const char *msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
|
|
||||||
void * tls_init(const struct tls_config *conf)
|
void * tls_init(const struct tls_config *conf)
|
||||||
{
|
{
|
||||||
struct tls_global *global;
|
struct tls_global *global;
|
||||||
|
|
|
@ -2901,7 +2901,6 @@ int tls_connection_get_write_alerts(void *ssl_ctx, struct tls_connection *conn)
|
||||||
static void ocsp_debug_print_resp(OCSP_RESPONSE *rsp)
|
static void ocsp_debug_print_resp(OCSP_RESPONSE *rsp)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||||
extern int wpa_debug_level;
|
|
||||||
BIO *out;
|
BIO *out;
|
||||||
size_t rlen;
|
size_t rlen;
|
||||||
char *txt;
|
char *txt;
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
#include "radius_das.h"
|
#include "radius_das.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
struct radius_das_data {
|
struct radius_das_data {
|
||||||
int sock;
|
int sock;
|
||||||
u8 *shared_secret;
|
u8 *shared_secret;
|
||||||
|
|
|
@ -298,8 +298,6 @@ struct radius_server_data {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
#define RADIUS_DEBUG(args...) \
|
#define RADIUS_DEBUG(args...) \
|
||||||
wpa_printf(MSG_DEBUG, "RADIUS SRV: " args)
|
wpa_printf(MSG_DEBUG, "RADIUS SRV: " args)
|
||||||
#define RADIUS_ERROR(args...) \
|
#define RADIUS_ERROR(args...) \
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
|
|
||||||
#include "wpabuf.h"
|
#include "wpabuf.h"
|
||||||
|
|
||||||
|
extern int wpa_debug_level;
|
||||||
|
extern int wpa_debug_show_keys;
|
||||||
|
extern int wpa_debug_timestamp;
|
||||||
|
|
||||||
/* Debugging function - conditional printf and hex dump. Driver wrappers can
|
/* Debugging function - conditional printf and hex dump. Driver wrappers can
|
||||||
* use these for debugging purposes. */
|
* use these for debugging purposes. */
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "tls/asn1.h"
|
#include "tls/asn1.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
static const char * asn1_class_str(int class)
|
static const char * asn1_class_str(int class)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "crypto/tls.h"
|
#include "crypto/tls.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
|
|
||||||
|
|
||||||
static void https_tls_event_cb(void *ctx, enum tls_event ev,
|
static void https_tls_event_cb(void *ctx, enum tls_event ev,
|
||||||
union tls_event_data *data)
|
union tls_event_data *data)
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
#include "crypto/milenage.h"
|
#include "crypto/milenage.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* milenage_opc - Determine OPc from OP and K
|
* milenage_opc - Determine OPc from OP and K
|
||||||
* @op: OP = 128-bit operator variant algorithm configuration field
|
* @op: OP = 128-bit operator variant algorithm configuration field
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "tls/x509v3.h"
|
#include "tls/x509v3.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "tls/asn1.h"
|
#include "tls/asn1.h"
|
||||||
#include "tls/x509v3.h"
|
#include "tls/x509v3.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "common/ieee802_11_defs.h"
|
#include "common/ieee802_11_defs.h"
|
||||||
#include "wlantest.h"
|
#include "wlantest.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
static const char * data_stype(u16 stype)
|
static const char * data_stype(u16 stype)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include "rsn_supp/wpa_ie.h"
|
#include "rsn_supp/wpa_ie.h"
|
||||||
#include "wlantest.h"
|
#include "wlantest.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
|
|
||||||
static int is_zero(const u8 *buf, size_t len)
|
static int is_zero(const u8 *buf, size_t len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,10 +13,6 @@
|
||||||
#include "wlantest.h"
|
#include "wlantest.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
|
|
||||||
|
|
||||||
static void test_vector_tkip(void)
|
static void test_vector_tkip(void)
|
||||||
{
|
{
|
||||||
u8 tk[] = {
|
u8 tk[] = {
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
#include "wlantest.h"
|
#include "wlantest.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
extern int wpa_debug_timestamp;
|
|
||||||
|
|
||||||
|
|
||||||
static void wlantest_terminate(int sig, void *signal_ctx)
|
static void wlantest_terminate(int sig, void *signal_ctx)
|
||||||
{
|
{
|
||||||
eloop_terminate();
|
eloop_terminate();
|
||||||
|
|
|
@ -1750,9 +1750,6 @@ static int wpa_supplicant_ctrl_iface_blacklist(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_timestamp;
|
|
||||||
|
|
||||||
static const char * debug_level_str(int level)
|
static const char * debug_level_str(int level)
|
||||||
{
|
{
|
||||||
switch (level) {
|
switch (level) {
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
#include "dbus_dict_helpers.h"
|
#include "dbus_dict_helpers.h"
|
||||||
#include "dbus_common_i.h"
|
#include "dbus_common_i.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
extern int wpa_debug_timestamp;
|
|
||||||
|
|
||||||
static const char *debug_strings[] = {
|
static const char *debug_strings[] = {
|
||||||
"excessive", "msgdump", "debug", "info", "warning", "error", NULL
|
"excessive", "msgdump", "debug", "info", "warning", "error", NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
#include "dbus_old_handlers.h"
|
#include "dbus_old_handlers.h"
|
||||||
#include "dbus_dict_helpers.h"
|
#include "dbus_dict_helpers.h"
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
extern int wpa_debug_timestamp;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpas_dbus_new_invalid_opts_error - Return a new invalid options error message
|
* wpas_dbus_new_invalid_opts_error - Return a new invalid options error message
|
||||||
* @message: Pointer to incoming dbus message this error refers to
|
* @message: Pointer to incoming dbus message this error refers to
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#include "wpas_glue.h"
|
#include "wpas_glue.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
|
|
||||||
struct wpa_driver_ops *wpa_drivers[] = { NULL };
|
struct wpa_driver_ops *wpa_drivers[] = { NULL };
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
#include "drivers/driver.h"
|
#include "drivers/driver.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
|
|
||||||
struct wpa_driver_ops *wpa_drivers[] = { NULL };
|
struct wpa_driver_ops *wpa_drivers[] = { NULL };
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,6 @@
|
||||||
#include "ap/wpa_auth.h"
|
#include "ap/wpa_auth.h"
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
|
|
||||||
|
|
||||||
struct wpa {
|
struct wpa {
|
||||||
u8 auth_addr[ETH_ALEN];
|
u8 auth_addr[ETH_ALEN];
|
||||||
u8 supp_addr[ETH_ALEN];
|
u8 supp_addr[ETH_ALEN];
|
||||||
|
|
|
@ -944,8 +944,6 @@ static void usage(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int c, i;
|
int c, i;
|
||||||
|
|
|
@ -104,10 +104,6 @@ const char *wpa_supplicant_full_license5 =
|
||||||
"\n";
|
"\n";
|
||||||
#endif /* CONFIG_NO_STDOUT_DEBUG */
|
#endif /* CONFIG_NO_STDOUT_DEBUG */
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
extern int wpa_debug_show_keys;
|
|
||||||
extern int wpa_debug_timestamp;
|
|
||||||
|
|
||||||
/* Configure default/group WEP keys for static WEP */
|
/* Configure default/group WEP keys for static WEP */
|
||||||
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
|
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2319,8 +2319,6 @@ int wpas_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
|
||||||
#endif /* CONFIG_WPS_NFC */
|
#endif /* CONFIG_WPS_NFC */
|
||||||
|
|
||||||
|
|
||||||
extern int wpa_debug_level;
|
|
||||||
|
|
||||||
static void wpas_wps_dump_ap_info(struct wpa_supplicant *wpa_s)
|
static void wpas_wps_dump_ap_info(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
Loading…
Reference in a new issue