📄 winterdata.h
字号:
/* WinterData.h *//******************************************************************************************* 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*******************************************************************************************/#ifndef __WINTERDATA_H__#define __WINTERDATA_H__#include "WDefs.h"#include "WinterModel.h"#include <wx/string.h>#include "xvnet.h"#define MAC_LENGTH 6class CWinterData : public CWinterModelChild{public: CWinterData( CWinterModel *model ); virtual ~CWinterData( );public: virtual bool Import( void *from ) = 0; virtual bool Export( void *to ) = 0;};class CMacAddressData : public CWinterData{protected: UCHAR mMacAddress[MAC_LENGTH];public: CMacAddressData( CWinterModel *model, UCHAR *mac_address ); virtual ~CMacAddressData( );public: virtual bool Import( void *from ); virtual bool Export( void *to );public: void SetMacAddress( UCHAR mac[MAC_LENGTH] ); UCHAR *GetMacAddress( );};class CWepInfoData : public CWinterData{protected: UCHAR mWepKeyToUse; UCHAR mWepMode; USHORT mAuthenticationType; int mEncryptionLevel; //0:Disabled,1:64bit,2:128 bit#ifdef ATMEL_WLAN UCHAR mWepKey[4][LONG_WEP_KEY_SIZE];#else UCHAR mWepKey1[ LONG_WEP_KEY_SIZE ]; UCHAR mWepKey2[ LONG_WEP_KEY_SIZE ]; UCHAR mWepKey3[ LONG_WEP_KEY_SIZE ]; UCHAR mWepKey4[ LONG_WEP_KEY_SIZE ];#endifpublic: CWepInfoData( CWinterModel *model, PENCRYPTION_INFO src ); virtual ~CWepInfoData( );public: virtual bool Import( void *from ); virtual bool Export( void *to );public: void SetWepKeyToUse( UCHAR wepkey ); UCHAR GetWepKeyToUse( ); void SetWepMode( UCHAR wepmode ); UCHAR GetWepMode( ); void SetAuthenticationType( USHORT authtype ); USHORT GetAuthenticationType( ); void SetEncryptionLevel( int encryptlevel ); int GetEncryptionLevel( );#ifdef ATMEL_WLAN void SetWepKey( UCHAR wepkey[LONG_WEP_KEY_SIZE], int n ); UCHAR *GetWepKey( int n );#else void SetWepKey1( UCHAR wepkey1[ LONG_WEP_KEY_SIZE ] ); UCHAR *GetWepKey1( ); void SetWepKey2( UCHAR wepkey2[ LONG_WEP_KEY_SIZE ] ); UCHAR *GetWepKey2( ); void SetWepKey3( UCHAR wepkey3[ LONG_WEP_KEY_SIZE ] ); UCHAR *GetWepKey3( ); void SetWepKey4( UCHAR wepkey4[ LONG_WEP_KEY_SIZE ] ); UCHAR *GetWepKey4( );#endifprotected: bool doimport( PENCRYPTION_INFO src ); bool doexport( PENCRYPTION_INFO tgt );};class CBssInfoData{protected: int mChannel; UCHAR mSSID[MAX_SSID_LENGTH]; UCHAR mSSIDsize; UCHAR mBSSID[6]; UCHAR mRSSI; UCHAR mUsingWep; UCHAR mPreambleType; USHORT mBeaconPeriod; UCHAR mBSStype;public: CBssInfoData( BSS_INFO_EX *src = NULL ); virtual ~CBssInfoData( );public: virtual bool Import( void *from ); virtual bool Export( void *to );public: void SetChannel( int channel ); int GetChannel( ); void SetSSID( UCHAR ssid[ MAX_SSID_LENGTH ] ); UCHAR *GetSSID( ); void SetSSIDsize( UCHAR ssidsize ); UCHAR GetSSIDsize( ); void SetBSSID( UCHAR bssid[ 6 ] ); UCHAR *GetBSSID( ); void SetRSSI( UCHAR rssi ); UCHAR GetRSSI( ); void SetUsingWep( UCHAR usingwep ); UCHAR GetUsingWep( ); void SetPreambleType( UCHAR preambletype ); UCHAR GetPreambleType( ); void SetBeaconPeriod( USHORT beaconperiod ); USHORT GetBeaconPeriod( ); void SetBSStype( UCHAR bsstype ); UCHAR GetBSStype( );protected: bool doimport( BSS_INFO_EX *src ); bool doexport( BSS_INFO_EX *tgt );};class CVersionInfoData : public CWinterData{protected: UCHAR mDriverMajorVersion; UCHAR mDriverMinorVersion; UCHAR mDriverSubVersion; USHORT mDriverBuild; USHORT mFwMajorVersion; USHORT mFwMinorVersion; USHORT mFwSubVersion; USHORT mFwBuild; public: CVersionInfoData( CWinterModel *model, VERSION_INFO *src ); virtual ~CVersionInfoData( );public: virtual bool Import( void *from ); virtual bool Export( void *to );public: void SetDriverMajorVersion( UCHAR majorversion ); UCHAR GetDriverMajorVersion( ); void SetDriverMinorVersion( UCHAR minorversion ); UCHAR GetDriverMinorVersion( ); void SetDriverSubVersion( UCHAR subversion ); UCHAR GetDriverSubVersion( ); void SetDriverBuild( USHORT driverbuild ); USHORT GetDriverBuild( ); void SetFwMajorVersion( USHORT fwmajorversion ); USHORT GetFwMajorVersion( ); void SetFwMinorVersion( USHORT fwminorversion ); USHORT GetFwMinorVersion( ); void SetFwSubVersion( USHORT fwsubversion ); USHORT GetFwSubVersion( ); void SetFwBuild( USHORT fwbuild ); USHORT GetFwBuild( );protected: bool doimport( VERSION_INFO *src ); bool doexport( VERSION_INFO *tgt );};class CStatisticsData : public CWinterData{protected: ULONG mTxDataPacketsOk; ULONG mTxDataPacketsError; ULONG mTxMgmtPacketsOk; ULONG mTxMgmtPacketsError; ULONG mRxDataPacketsOk; ULONG mRxDataPacketsError; ULONG mRxMgmtPacketsOk; ULONG mRxMgmtPacketsError; ULONG mRxLost; ULONG mTxPacketsRejectedNotReady; ULONG mTxPacketsRejectedResources; ULONG mMatchingBeacons;public: CStatisticsData( CWinterModel *model, STATISTICS *src ); virtual ~CStatisticsData( );public: virtual bool Import( void *from ); virtual bool Export( void *to );public: void SetTxDataPacketsOk( ULONG txdatapacketsok ); ULONG GetTxDataPacketsOk( ); void SetTxDataPacketsError( ULONG txdatapacketserror ); ULONG GetTxDataPacketsError( ); void SetTxMgmtPacketsOk( ULONG txmgmtpacketsok ); ULONG GetTxMgmtPacketsOk( ); void SetTxMgmtPacketsError( ULONG txmgmtpacketserror ); ULONG GetTxMgmtPacketsError( ); void SetRxDataPacketsOk( ULONG rxdatapacketsok ); ULONG GetRxDataPacketsOk( ); void SetRxDataPacketsError( ULONG rxdatapackteserror ); ULONG GetRxDataPacketsError( ); void SetRxMgmtPacketsOk( ULONG rxmgmtpacketsok ); ULONG GetRxMgmtPacketsOk( ); void SetRxMgmtPacketsError( ULONG rxmgmtpacketserror ); ULONG GetRxMgmtPacketsError( ); void SetRxLost( ULONG rxlost ); ULONG GetRxLost( ); void SetTxPacketsRejectedNotReady( ULONG txpacketsrejnotready ); ULONG GetTxPacketsRejectedNotReady( ); void SetTxPacketsRejectedResources( ULONG txpacketsrejresources ); ULONG GetTxPacketsRejectedResources( ); void SetMatchingBeacons( ULONG matchingbeacons ); ULONG GetMatchingBeacons( );protected: bool doimport( STATISTICS *src ); bool doexport( STATISTICS *tgt );};class CDeviceConfigurationData : public CWinterData{protected: UCHAR mOperatingMode; UCHAR mChannel; UCHAR mSSID[ MAX_SSID_LENGTH ]; UCHAR mSSIDLength; UCHAR mTxRate; UCHAR mPowerMgmtMode; UCHAR mInternationalRoaming; UCHAR mRadioIsOn; UCHAR mPreambleType; USHORT mFragmentationThreshold; USHORT mRtsCtsThreshold; UCHAR mBSSID[6]; UCHAR mStationState; UCHAR mRssi; UCHAR mLinkQuality; UCHAR mRegDomain; UCHAR mChannelVector[14]; ULONG mMgmtErrorCode;public: CDeviceConfigurationData( CWinterModel *model, DEVICE_CONFIGURATION *src ); virtual ~CDeviceConfigurationData( );public: virtual bool Import( void *from ); virtual bool Export( void *to );public: void SetOperatingMode( UCHAR opermode ); UCHAR GetOperatingMode( ); void SetChannel( UCHAR channel ); UCHAR GetChannel( ); void SetSSID( UCHAR essid[ MAX_SSID_LENGTH ] ); UCHAR *GetSSID( ); void SetSSIDLength( UCHAR ssid_length ); UCHAR GetSSIDLength( ); void SetTxRate( UCHAR txrate ); UCHAR GetTxRate( ); void SetPowerMgmtMode( UCHAR powermgmtmode ); UCHAR GetPowerMgmtMode( ); void SetInternationalRoaming( UCHAR introaming ); UCHAR GetInternationalRoaming( ); void SetRadioIsOn( UCHAR radioison ); UCHAR GetRadioIsOn( ); void SetPreambleType( UCHAR preambletype ); UCHAR GetPreambleType( ); void SetFragmentationThreshold( USHORT fragthreshold ); USHORT GetFragmentationThreshold( ); void SetRtsCtsThreshold( USHORT rtsctsthreshold ); USHORT GetRtsCtsThreshold( ); void SetBSSID( UCHAR bssid[6] ); UCHAR *GetBSSID( ); void SetStationState( UCHAR stationstate ); UCHAR GetStationState( ); void SetRssi( UCHAR rssi ); UCHAR GetRssi( ); void SetLinkQuality( UCHAR linkquality ); UCHAR GetLinkQuality( ); void SetRegDomain( UCHAR regdomain ); UCHAR GetRegDomain( ); void SetChannelVector( UCHAR channelvector[14] ); UCHAR *GetChannelVector( ); void SetMgmtErrorCode( ULONG mgmterrorcode ); ULONG GetMgmtErrorCode( );protected: bool doimport( DEVICE_CONFIGURATION *src ); bool doexport( DEVICE_CONFIGURATION *tgt );};#endif // __WINTERDATA_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -