summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epan/crypt/airpdcap.c14
-rw-r--r--epan/crypt/airpdcap_debug.h10
2 files changed, 13 insertions, 11 deletions
diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c
index 1212cdde7c..a0a04688c3 100644
--- a/epan/crypt/airpdcap.c
+++ b/epan/crypt/airpdcap.c
@@ -546,7 +546,7 @@ static INT AirPDcapScanForKeys(
};
const EAPOL_RSN_KEY *pEAPKey;
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
#define MSGBUF_LEN 255
CHAR msgbuf[MSGBUF_LEN];
#endif
@@ -633,7 +633,7 @@ static INT AirPDcapScanForKeys(
/* get STA address */
if ( (addr=AirPDcapGetStaAddress((const AIRPDCAP_MAC_FRAME_ADDR4 *)(data))) != NULL) {
memcpy(id.sta, addr, AIRPDCAP_MAC_LEN);
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
g_snprintf(msgbuf, MSGBUF_LEN, "ST_MAC: %2X.%2X.%2X.%2X.%2X.%2X\t", id.sta[0],id.sta[1],id.sta[2],id.sta[3],id.sta[4],id.sta[5]);
#endif
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapScanForKeys", msgbuf, AIRPDCAP_DEBUG_LEVEL_3);
@@ -763,7 +763,7 @@ INT AirPDcapPacketProcess(
UCHAR tmp_data[AIRPDCAP_MAX_CAPLEN];
guint tmp_len;
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
#define MSGBUF_LEN 255
CHAR msgbuf[MSGBUF_LEN];
#endif
@@ -864,7 +864,7 @@ INT AirPDcapPacketProcess(
/* force STA address to broadcast MAC so we load the SA for the groupkey */
memcpy(id.sta, broadcast_mac, AIRPDCAP_MAC_LEN);
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
g_snprintf(msgbuf, MSGBUF_LEN, "ST_MAC: %2X.%2X.%2X.%2X.%2X.%2X\t", id.sta[0],id.sta[1],id.sta[2],id.sta[3],id.sta[4],id.sta[5]);
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapPacketProcess", msgbuf, AIRPDCAP_DEBUG_LEVEL_3);
#endif
@@ -922,7 +922,7 @@ INT AirPDcapSetKeys(
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapSetKeys", "Set a WPA-PWD key", AIRPDCAP_DEBUG_LEVEL_4);
AirPDcapRsnaPwd2Psk(keys[i].UserPwd.Passphrase, keys[i].UserPwd.Ssid, keys[i].UserPwd.SsidLen, keys[i].KeyData.Wpa.Psk);
}
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
else if (keys[i].KeyType==AIRPDCAP_KEY_TYPE_WPA_PMK) {
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapSetKeys", "Set a WPA-PMK key", AIRPDCAP_DEBUG_LEVEL_4);
} else if (keys[i].KeyType==AIRPDCAP_KEY_TYPE_WEP) {
@@ -1700,7 +1700,7 @@ AirPDcapGetSaAddress(
const AIRPDCAP_MAC_FRAME_ADDR4 *frame,
AIRPDCAP_SEC_ASSOCIATION_ID *id)
{
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
#define MSGBUF_LEN 255
CHAR msgbuf[MSGBUF_LEN];
#endif
@@ -1735,7 +1735,7 @@ AirPDcapGetSaAddress(
}
}
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
g_snprintf(msgbuf, MSGBUF_LEN, "BSSID_MAC: %02X.%02X.%02X.%02X.%02X.%02X\t",
id->bssid[0],id->bssid[1],id->bssid[2],id->bssid[3],id->bssid[4],id->bssid[5]);
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapGetSaAddress", msgbuf, AIRPDCAP_DEBUG_LEVEL_3);
diff --git a/epan/crypt/airpdcap_debug.h b/epan/crypt/airpdcap_debug.h
index 149384e8ed..118552260a 100644
--- a/epan/crypt/airpdcap_debug.h
+++ b/epan/crypt/airpdcap_debug.h
@@ -37,7 +37,9 @@
#include "airpdcap_interop.h"
-#ifdef _DEBUG
+/* #define AIRPDCAP_DEBUG 1 */
+
+#ifdef AIRPDCAP_DEBUG
#ifdef __FUNCTION__
#define AIRPDCAP_DEBUG_PRINT_LINE(notdefined, msg, level) print_debug_line(__FUNCTION__, msg, level);
#else
@@ -54,7 +56,7 @@
/******************************************************************************/
/* Debug section: internal function to print debug information */
/* */
-#ifdef _DEBUG
+#ifdef AIRPDCAP_DEBUG
#include <stdio.h>
#include <time.h>
@@ -100,7 +102,7 @@ static inline void DEBUG_DUMP(const char* x, const guint8* y, int z)
wmem_free(NULL, tmp_str);
}
-#else /* !defined _DEBUG */
+#else /* !defined AIRPDCAP_DEBUG */
#define AIRPDCAP_DEBUG_LEVEL_1
#define AIRPDCAP_DEBUG_LEVEL_2
@@ -113,7 +115,7 @@ static inline void DEBUG_DUMP(const char* x, const guint8* y, int z)
#define DEBUG_DUMP(x,y,z)
-#endif /* ?defined _DEBUG */
+#endif /* ?defined AIRPDCAP_DEBUG */
#endif /* ?defined _AIRPDCAP_DEBUG_H */