]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Declare wpa_debug_* variables in src/utils/wpa_debug.h
authorJouni Malinen <j@w1.fi>
Tue, 31 Dec 2013 17:29:52 +0000 (19:29 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 31 Dec 2013 17:29:52 +0000 (19:29 +0200)
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>

27 files changed:
eap_example/eap_example.c
hostapd/main.c
radius_example/radius_example.c
src/ap/hostapd.c
src/crypto/tls_gnutls.c
src/crypto/tls_openssl.c
src/radius/radius_das.c
src/radius/radius_server.c
src/utils/wpa_debug.h
tests/test-asn1.c
tests/test-https.c
tests/test-milenage.c
tests/test-x509.c
tests/test-x509v3.c
wlantest/rx_data.c
wlantest/rx_eapol.c
wlantest/test_vectors.c
wlantest/wlantest.c
wpa_supplicant/ctrl_iface.c
wpa_supplicant/dbus/dbus_new_handlers.c
wpa_supplicant/dbus/dbus_old_handlers.c
wpa_supplicant/eapol_test.c
wpa_supplicant/preauth_test.c
wpa_supplicant/tests/test_wpa.c
wpa_supplicant/wpa_priv.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wps_supplicant.c

index 68f3c002ca929f8b0eb64777d3c53cb357a730e2..8a48cd34b030b39e08b654733b8b90a55e1f0128 100644 (file)
@@ -23,8 +23,6 @@ void eap_example_server_deinit(void);
 int eap_example_server_step(void);
 
 
-extern int wpa_debug_level;
-
 int main(int argc, char *argv[])
 {
        int res_s, res_p;
index 1b798dafc0427f9910934682e8e7f8f24ffe13ce..196bccc7108b3ed5244ec429fa83682df0c38b47 100644 (file)
 #include "ctrl_iface.h"
 
 
-extern int wpa_debug_level;
-extern int wpa_debug_show_keys;
-extern int wpa_debug_timestamp;
-
-
 struct hapd_global {
        void **drv_priv;
        size_t drv_count;
index cb0e154301ce354963042ecf058a9e41d0a62b36..e4b3678631713f856b06b811c8a1d0ab5c26003b 100644 (file)
@@ -13,8 +13,6 @@
 #include "radius/radius.h"
 #include "radius/radius_client.h"
 
-extern int wpa_debug_level;
-
 struct radius_ctx {
        struct radius_client_data *radius;
        struct hostapd_radius_servers conf;
index 71f8ee2b424e86c4d542dabad48ad5be56ee625e..44d05c5d8f9f703889a5f86677287cd80df32c67 100644 (file)
@@ -41,8 +41,6 @@ static int hostapd_broadcast_wep_clear(struct hostapd_data *hapd);
 static int setup_interface2(struct hostapd_iface *iface);
 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 (*cb)(struct hostapd_iface *iface,
index a5d72f407a8d22bc39b983a728ba547164d893be..cb23eb9c5f36fd36bd37cc17c907cc8b079598ee 100644 (file)
@@ -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)
 {
        struct tls_global *global;
index 257d95abe9d7532332e4f51b1fbac1569c91f0c8..d025ae0a8a6d0a8201b91d8b7db30a24c1c12c4f 100644 (file)
@@ -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)
 {
 #ifndef CONFIG_NO_STDOUT_DEBUG
-       extern int wpa_debug_level;
        BIO *out;
        size_t rlen;
        char *txt;
index 418b1605c12bc8b9fdb31588cbe213fbe5bdd9a4..b2a27735b3d48ec94cdbbe575f5e8c9368ec1a22 100644 (file)
@@ -16,9 +16,6 @@
 #include "radius_das.h"
 
 
-extern int wpa_debug_level;
-
-
 struct radius_das_data {
        int sock;
        u8 *shared_secret;
index 48b3c700810c7ba888389d232b0b2b8f6d36cd4c..1063d65acebea0791cfbb23a13d1bce935b42150 100644 (file)
@@ -298,8 +298,6 @@ struct radius_server_data {
 };
 
 
-extern int wpa_debug_level;
-
 #define RADIUS_DEBUG(args...) \
 wpa_printf(MSG_DEBUG, "RADIUS SRV: " args)
 #define RADIUS_ERROR(args...) \
index 0013cf20a13e79415097d8e1bf7965a58aa44fd0..50e8ae9d5589019f1fc15c11b8e8a643cb962732 100644 (file)
 
 #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
  * use these for debugging purposes. */
 
index 7b6f7be23b94633dc52c3b1992a72a37113e5c37..c6957fd2519fee53823a05d9fa3296c82414c52d 100644 (file)
@@ -11,8 +11,6 @@
 #include "common.h"
 #include "tls/asn1.h"
 
-extern int wpa_debug_level;
-
 
 static const char * asn1_class_str(int class)
 {
index 2f41500c9b2f770d78d4a59266ec1af7d7b444f3..a72e56f9d21c7016a6afc3590519f8f2bdf85a35 100644 (file)
@@ -12,9 +12,6 @@
 #include "common.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,
                               union tls_event_data *data)
index 9d2f7f0cc34155567a23f02a47f50c6e1ee9e143..7c4be09020a1b60a6cb735b067bd8b5f8e199f5e 100644 (file)
@@ -5,9 +5,6 @@
 #include "crypto/milenage.h"
 
 
-extern int wpa_debug_level;
-
-
 /**
  * milenage_opc - Determine OPc from OP and K
  * @op: OP = 128-bit operator variant algorithm configuration field
index e92ea613ce2d66083d24a2d247a0888c0302a495..194f229e909ebab376c05f9a3a605075ce7e88f7 100644 (file)
@@ -11,8 +11,6 @@
 #include "common.h"
 #include "tls/x509v3.h"
 
-extern int wpa_debug_level;
-
 
 int main(int argc, char *argv[])
 {
index 1290b5cee76c2481e5d90d52e87bbbe313c123f4..bfb0698710dd5d1198cac28b4dbb6837a94cd046 100644 (file)
@@ -12,8 +12,6 @@
 #include "tls/asn1.h"
 #include "tls/x509v3.h"
 
-extern int wpa_debug_level;
-
 
 int main(int argc, char *argv[])
 {
index d23425e4ad444cf90a6e3f17b64923ef621bb43b..dec5857ea30785698a2dc4e5e4f9fa3134d51a53 100644 (file)
@@ -14,8 +14,6 @@
 #include "common/ieee802_11_defs.h"
 #include "wlantest.h"
 
-extern int wpa_debug_level;
-
 
 static const char * data_stype(u16 stype)
 {
index 463e8418037005f116680aa2dd36b19436831f57..5e1ad349a6afc212626a2bf4a6282fb2f15559ca 100644 (file)
@@ -19,8 +19,6 @@
 #include "rsn_supp/wpa_ie.h"
 #include "wlantest.h"
 
-extern int wpa_debug_level;
-
 
 static int is_zero(const u8 *buf, size_t len)
 {
index 2320a7e9a6067156194dedc96c65a5057a1a161d..0800db7f3a3adeaf0b67b1570f82320a6d4c0de5 100644 (file)
 #include "wlantest.h"
 
 
-extern int wpa_debug_level;
-extern int wpa_debug_show_keys;
-
-
 static void test_vector_tkip(void)
 {
        u8 tk[] = {
index d1b550e8ca2cf69d80361e84d318120b3bd19891..a2141414a4ac08ea82866964d2b63bbaa4520544 100644 (file)
 #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)
 {
        eloop_terminate();
index 975e42c93cd98d2640a94003b112a0247ee19fc5..7d7576f6e4c65f7110b0fd7c991a927372a11b3b 100644 (file)
@@ -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)
 {
        switch (level) {
index 4a2261aba7a90b06e2d3b62f8f03375b62d06d2e..5380b430aa05e54bf297de02de00bf6847ec635a 100644 (file)
 #include "dbus_dict_helpers.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[] = {
        "excessive", "msgdump", "debug", "info", "warning", "error", NULL
 };
index 6d178f4593d7189292280f879f15e2153e5ce408..7c4630e475baecc269862ea53df58c4e6dafd99b 100644 (file)
 #include "dbus_old_handlers.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
  * @message: Pointer to incoming dbus message this error refers to
index 2b25b6995ab82a4d00e2e2a7bc85d8c6f8243f83..cb7147548cf593ebcfc8bbb5875ea032a40f3f7e 100644 (file)
@@ -30,9 +30,6 @@
 #include "wpas_glue.h"
 
 
-extern int wpa_debug_level;
-extern int wpa_debug_show_keys;
-
 struct wpa_driver_ops *wpa_drivers[] = { NULL };
 
 
index ff2ae747a9b9a7dba5c4ccc55a4c0371b5b501fd..ed5708585be1d740b341f6ed147766b64eb2499c 100644 (file)
@@ -27,9 +27,6 @@
 #include "drivers/driver.h"
 
 
-extern int wpa_debug_level;
-extern int wpa_debug_show_keys;
-
 struct wpa_driver_ops *wpa_drivers[] = { NULL };
 
 
index 484a4068f5640b8dd2e127a91df3fda94210064e..39971f285de34820c5489071544e0a69624bc8b1 100644 (file)
 #include "ap/wpa_auth.h"
 
 
-extern int wpa_debug_level;
-extern int wpa_debug_show_keys;
-
-
 struct wpa {
        u8 auth_addr[ETH_ALEN];
        u8 supp_addr[ETH_ALEN];
index 3c4355a19078869c53d06da5d1378436cabc773d..5426177a52184cd7490891c1ce101fa46ac972d4 100644 (file)
@@ -944,8 +944,6 @@ static void usage(void)
 }
 
 
-extern int wpa_debug_level;
-
 int main(int argc, char *argv[])
 {
        int c, i;
index d3e11acafcd063c51c3974290388fe4746ea66f1..31e71f1be69b04a934daf575e34c7553885a5d8e 100644 (file)
@@ -104,10 +104,6 @@ const char *wpa_supplicant_full_license5 =
 "\n";
 #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 */
 int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 {
index bd4d1667630cf7c6a201eaf5f18794417078b69b..51d47c392375e7c069ce8ec2ed4cc097f4460865 100644 (file)
@@ -2319,8 +2319,6 @@ int wpas_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
 #endif /* CONFIG_WPS_NFC */
 
 
-extern int wpa_debug_level;
-
 static void wpas_wps_dump_ap_info(struct wpa_supplicant *wpa_s)
 {
        size_t i;