⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winterdebug.cpp

📁 atmel usb 无线网卡驱动程序
💻 CPP
字号:
/* WinterDebug.cpp *//*******************************************************************************************	Copyright 2002-2003 ATMEL Corporation.	This file is part of ATMEL Wireless LAN Drivers.	ATMEL Wireless LAN Drivers is free software; you can redistribute it and/or modify	it under the terms of the GNU General Public License as published by	the Free Software Foundation; either version 2 of the License, or	(at your option) any later version.	ATMEL Wireless LAN Drivers is distributed in the hope that it will be useful,	but WITHOUT ANY WARRANTY; without even the implied warranty of	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the	GNU General Public License for more details.	You should have received a copy of the GNU General Public License	along with ATMEL Wireless LAN Drivers; if not, write to the Free Software	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*******************************************************************************************/#include "WinterDebug.h"#include "WinterSetup.h"#include <wx/string.h>#include <wx/log.h>#define RUF_DEFAULT_DUMP	16CWinterRuf::CWinterRuf( ){}CWinterRuf::~CWinterRuf( ){}void CWinterRuf::RufStruct( DEVICE_CONFIGURATION *src ){	Log( wxT( "" ) );	Log( wxT( "DEVICE_CONFIGURATION" ) );	Log( wxT( "UCHAR	Channel			: %d" ), src->Channel );	Log( wxT( "UCHAR	SSIDLength		: %d" ), src->SSIDlength );	// TODO: Display the whole of the SSID array.	Log( wxT( "UCHAR	SSID[%d]		: %s" ), MAX_SSID_LENGTH, src->SSID );	Log( wxT( "UCHAR	OperatingMode 		: %d" ), src->OperatingMode );	Log( wxT( "UCHAR	TxRate 			: %d" ), src->TxRate );	Log( wxT( "UCHAR	PowerMgmtMode 		: %d" ), src->PowerMgmtMode );	Log( wxT( "UCHAR	InternationalRoaming	: %d" ), src->InternationalRoaming );	Log( wxT( "UCHAR	RadioIsOn 		: %d" ), src->RadioIsOn );	Log( wxT( "UCHAR	PreambleType 		: %d" ), src->PreambleType );	Log( wxT( "USHORT	FragmentationThreshold	: %d" ), src->FragmentationThreshold );	Log( wxT( "USHORT	RtsCtsThreshold		: %d" ), src->RtsCtsThreshold );	Log( wxT( "UCHAR	StationState		: %d" ), src->StationState );	Log( wxT( "UCHAR	Rssi 			: %d" ), src->Rssi );	Log( wxT( "UCHAR	LinkQuality		: %d" ), src->LinkQuality );	Log( wxT( "UCHAR	RegDomain		: %d" ), src->RegDomain );	return;}void CWinterRuf::RufStruct( PENCRYPTION_INFO src ){	Log( wxT( "" ) );	Log( wxT( "WEP_INFO" ) );	Log( wxT( "UCHAR	WepKeyToUse		: %d" ), src->WepKeyToUse );	Log( wxT( "UCHAR	WepMode			: %d" ), src->WepMode );	Log( wxT( "USHORT	AuthenticationType	: %d" ), src->AuthenticationType );	Log( wxT( "UCHAR	EncryptionLevel		: %d" ), src->EncryptionLevel ); //0:Disabled,1:64bit,2:128 bit	int c;	Log( wxT( "UCHAR	WepKey1[%d]		: " ), LONG_WEP_KEY_SIZE );#ifdef ATMEL_WLAN	UCHAR *wepkey = new UCHAR[MAX_ENCRYPTION_KEY_SIZE];	for(int i=0; i<MAX_ENCRYPTION_KEYS; i++)	{		memcpy(wepkey, src->KeyMaterial[i], LONG_WEP_KEY_SIZE);		for(int c=0; c<LONG_WEP_KEY_SIZE; c++)		{			Log( wxT( "\t\t\t\t0x%2.2X - %c" ), wepkey[c], wepkey[c] );		}	}	delete wepkey;#else	for( c = 0; c < LONG_WEP_KEY_SIZE; c++ )	{		Log( wxT( "\t\t\t\t0x%2.2X - %c" ), src->WepKey1[ c ], src->WepKey1[ c ] );	}	Log( wxT( "UCHAR	WepKey2[%d]		: " ), LONG_WEP_KEY_SIZE );	for( c = 0; c < LONG_WEP_KEY_SIZE; c++ )	{		Log( wxT( "\t\t\t\t0x%2.2X - %c" ), src->WepKey2[ c ], src->WepKey2[ c ] );	}	Log( wxT( "UCHAR	WepKey3[%d]		: " ), LONG_WEP_KEY_SIZE );	for( c = 0; c < LONG_WEP_KEY_SIZE; c++ )	{		Log( wxT( "\t\t\t\t0x%2.2X - %c" ), src->WepKey3[ c ], src->WepKey3[ c ] );	}	Log( wxT( "UCHAR	WepKey4[%d]		: " ), LONG_WEP_KEY_SIZE );	for( c = 0; c < LONG_WEP_KEY_SIZE; c++ )	{		Log( wxT( "\t\t\t\t0x%2.2X - %c" ), src->WepKey4[ c ], src->WepKey4[ c ] );	}#endif // ATMEL_WLAN	return;}void CWinterRuf::RufStruct( void *src ){	Log( "Call to RufStruct( ( void * ) 0x%08X ). Possible bug!", src );	Log( wxT( "Dumping %d first bytes :" ), RUF_DEFAULT_DUMP );	for( int c = 0; c < RUF_DEFAULT_DUMP; c++ )	{		Log( wxT ( "%02d: 0x%2.2X - %c" ), c, ( ( char * ) src )[ c ], ( ( char * ) src )[ c ] );	}	return;}void CWinterRuf::Log( const char *formatstring, ... ){#if ENABLE_DEBUG_MESSAGES == 1	wxString dbg_msg;	va_list args;	va_start( args, formatstring );	dbg_msg.PrintfV( formatstring, args );	printf( wxT( "%s\n" ), dbg_msg.c_str( ) );#endif // ENABLE_DEBUG_MESSAGES	return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -