256 lines
8.4 KiB
C
256 lines
8.4 KiB
C
/* ipwps_debug.h - IPWPS DEBUG-ONLY header file */
|
|
/*
|
|
* Copyright (c) 2008 Wind River Systems, Inc.
|
|
*
|
|
* The right to copy, distribute, modify, or otherwise make use
|
|
* of this software may be licensed only pursuant to the terms
|
|
* of an applicable Wind River license agreement.
|
|
*
|
|
*/
|
|
|
|
/*
|
|
modification history
|
|
--------------------
|
|
01a,29Dec08,mry Created
|
|
*/
|
|
#ifndef IPWPS_DEBUG_H
|
|
#define IPWPS_DEBUG_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/* This header file is to be included by internal modules for the purpose of
|
|
* supporting DEBUG ONLY functionality.
|
|
* The following APIs and definitions are to be used for debugging purposes ONLY.
|
|
* They are not part of the officially supported wps APIs.
|
|
* Behavior when these commands are invoked is not guaranteed to be valid
|
|
* nor safe for normal operation.
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
#include "ipwps_sysvar.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <ipcom_type.h>
|
|
#include <ipcom_cstyle.h>
|
|
#include <ipcom_sock.h>
|
|
#include <ipcom_ipd.h>
|
|
#include <vsbConfig.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
#ifdef _WRS_CONFIG_IPWPS_DEBUG
|
|
#ifndef IPWPS_DEBUG
|
|
#define IPWPS_DEBUG
|
|
#endif
|
|
#endif
|
|
|
|
#if defined(IP_DEBUG) || defined(IPWPS_DEBUG)
|
|
#define IPWPS_USE_DUMP_PACKET
|
|
#endif
|
|
|
|
#ifdef IPWPS_DEBUG
|
|
/* Define/Undefine some/all of these do increase/reduce debug output */
|
|
#undef IPWPS_DEBUG_IPD_INPUT
|
|
#undef IPWPS_DEBUG_TIMERS
|
|
#undef IPWPS_DEBUG_WPS_EVENTS
|
|
#undef IPWPS_DEBUG_WSC_EVENTS
|
|
#undef IPWPS_DEBUG_PROTOMSG_PARSE /* WARNING: Turning this flag could introduce a signifcant # of logs and associated delays */
|
|
#undef IPWPS_DEBUG_PROTOMSG_FORMAT /* WARNING: Turning this flag could introduce a signifcant # of logs and associated delays */
|
|
#undef IPWPS_DEBUG_PROTO_CRYPTO_RANDGEN /* WARNING: Turning this flag on exposes sensitive cryptographic information. Use discretion */
|
|
#undef IPWPS_DEBUG_PROTO_CRYPTO_DATA /* WARNING: Turning this flag on exposes sensitive cryptographic information. Use discretion */
|
|
#undef IPWPS_DEBUG_ALLOW_CREDENTIAL_KEY_DISPLAY /* WARNING: Turning this flag on exposes sensitive security information. Use discretion */
|
|
#undef IPWPS_DEBUG_PROTO_HANDLER
|
|
#undef IPWPS_DEBUG_PROTO_ADAPTOR
|
|
#undef IPWPS_DEBUG_PROTO_ADAPTOR_EVENTS
|
|
#undef IPWPS_DEBUG_DISPLAY_PROTO_MSGS
|
|
#undef IPWPS_DEBUG_DISPLAY_PROTO_IEDATA
|
|
#undef IPWPS_DEBUG_DISPLAY_PROTO_DYCRPT_SETTINGS /* WARNING: Turning this flag on exposes sensitive data. Use discretion */
|
|
#undef IPWPS_DEBUG_DRV_IF
|
|
#undef IPWPS_DEBUG_SEC_CONFIG
|
|
#undef IPWPS_DEBUG_AP_SM
|
|
#undef IPWPS_DEBUG_AP
|
|
#undef IPWPS_DEBUG_AP_VERBOSE
|
|
#undef IPWPS_DEBUG_ENROLLEE_SM
|
|
#undef IPWPS_DEBUG_ENROLLEE
|
|
#undef IPWPS_DEBUG_ENROLLEE_VERBOSE
|
|
#undef IPWPS_DEBUG_REGISTRAR_SM
|
|
#undef IPWPS_DEBUG_REGISTRAR
|
|
#undef IPWPS_DEBUG_REGISTRAR_VERBOSE
|
|
#undef IPWPS_DEBUG_PIN
|
|
#undef IPWPS_DEBUG_CEREDENTIALS
|
|
|
|
#else
|
|
|
|
#undef IPWPS_DEBUG_IPD_INPUT
|
|
#undef IPWPS_DEBUG_TIMERS
|
|
#undef IPWPS_DEBUG_WPS_EVENTS
|
|
#undef IPWPS_DEBUG_WSC_EVENTS
|
|
#undef IPWPS_DEBUG_PROTOMSG_PARSE
|
|
#undef IPWPS_DEBUG_PROTOMSG_FORMAT
|
|
#undef IPWPS_DEBUG_PROTO_CRYPTO_RANDGEN /* WARNING: Turning this flag on exposes sensitive cryptographic information. Use discretion */
|
|
#undef IPWPS_DEBUG_PROTO_CRYPTO_DATA /* WARNING: Turning this flag on exposes sensitive cryptographic information. Use discretion */
|
|
#undef IPWPS_DEBUG_ALLOW_CREDENTIAL_KEY_DISPLAY /* WARNING: Turning this flag on exposes sensitive security credentials. Use discretion */
|
|
#undef IPWPS_DEBUG_PROTO_HANDLER
|
|
#undef IPWPS_DEBUG_PROTO_ADAPTOR
|
|
#undef IPWPS_DEBUG_PROTO_ADAPTOR_EVENTS
|
|
#undef IPWPS_DEBUG_DISPLAY_PROTO_MSGS
|
|
#undef IPWPS_DEBUG_DISPLAY_PROTO_IEDATA
|
|
#undef IPWPS_DEBUG_DISPLAY_PROTO_DYCRPT_SETTINGS /* WARNING: Turning this flag on exposes sensitive data. Use discretion */
|
|
#undef IPWPS_DEBUG_DRV_IF
|
|
#undef IPWPS_DEBUG_SEC_CONFIG
|
|
#undef IPWPS_DEBUG_AP_SM
|
|
#undef IPWPS_DEBUG_AP
|
|
#undef IPWPS_DEBUG_AP_VERBOSE
|
|
#undef IPWPS_DEBUG_ENROLLEE_SM
|
|
#undef IPWPS_DEBUG_ENROLLEE
|
|
#undef IPWPS_DEBUG_ENROLLEE_VERBOSE
|
|
#undef IPWPS_DEBUG_REGISTRAR_SM
|
|
#undef IPWPS_DEBUG_REGISTRAR
|
|
#undef IPWPS_DEBUG_REGISTRAR_VERBOSE
|
|
#undef IPWPS_DEBUG_PIN
|
|
#undef IPWPS_DEBUG_CEREDENTIALS
|
|
|
|
#endif
|
|
|
|
#undef IPWPS_ENABLE_WPS_TESTAPP /* Enable only for testing purposes */
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
struct Ipwps_ctx_st;
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
/* These commands are for debugging only and are not part of the officially supported
|
|
* wps commands. Behavior when these commands are invoked is not guaranteed to be valid
|
|
* nor safe for normal operation.
|
|
*/
|
|
#ifdef IPWPS_DEBUG
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_dbg_wps_begin
|
|
*===========================================================================
|
|
* Description: Trigger a WPS Begin Event
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_dbg_wps_begin(void);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_dbg_ap_show
|
|
*===========================================================================
|
|
* Description: Show the internal AP details using DEBUG2 level logs
|
|
* (FOR DEBUGGING PURPOSES ONLY).
|
|
* May expose sensitive information.
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_dbg_ap_show(void);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_dbg_enrollee_show
|
|
*===========================================================================
|
|
* Description: Show the internal Enrollee details using DEBUG2 level logs
|
|
* (FOR DEBUGGING PURPOSES ONLY).
|
|
* May expose sensitive information.
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_dbg_enrollee_show(void);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_dbg_registrar_show
|
|
*===========================================================================
|
|
* Description: Show the internal Registrar details using DEBUG2 level logs
|
|
* (FOR DEBUGGING PURPOSES ONLY).
|
|
* May expose sensitive information.
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_dbg_registrar_show(void);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_dbg_timers_show
|
|
*===========================================================================
|
|
* Description: Show the internal WPS timer details using DEBUG2 level logs
|
|
* (FOR DEBUGGING PURPOSES ONLY).
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_dbg_timers_show(void);
|
|
|
|
#ifdef IPWPS_ENABLE_WPS_TESTAPP
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_testapp_init
|
|
*===========================================================================
|
|
* Description: Initializes the debug wps application which sends and receives
|
|
* some WPS test vectors.
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_testapp_init(struct Ipwps_ctx_st* ctx);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipwps_testapp_shutdown
|
|
*===========================================================================
|
|
* Description: SHutdown the debug wps application which sends and receives
|
|
* some WPS test vectors.
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ip_err ipwps_testapp_shutdown(struct Ipwps_ctx_st* ctx);
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|