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

📄 platforminterface.h

📁 该系统可以对WLAN中的无线数据帧进行格式解析
💻 H
字号:
/*************************************************************************** *   Copyright (C) 2007 by root   * *   root@hello   * *                                                                         * *   This program 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.                                   * *                                                                         * *   This program 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 this program; if not, write to the                         * *   Free Software Foundation, Inc.,                                       * *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             * ***************************************************************************/#ifndef PLATFORMINTERFACE_H#define PLATFORMINTERFACE_H#include "Common.h"#include "error.h"/*type definition*/#ifndef ETH_ALEN#define ETH_ALEN 6#endif/*size definition*/#define IFNAMESIZE 30		/*interface name size*/#define SSIDNAMESIZE 32		/*ssid name size*/#define PLUGNAMESIZE 30		/*plugin name size*/#define NETNAMESIZE 30		/*net type name size, w11b etc*/#define DRIVEROPSNAMESIZE 30	/*driver ops name size*/#define DRIVEROPSDESCSIZE 30	/*drive ops description size*/#define MODULENAMESIZE 30	/*module name size*/#define PLUGIN_TYPE_SIZE 30#define MSG_SIZE 1024/*define ipc socket addr*/#define HOST_GUI_RECV_PATH 	"/tmp/gui_sock"#define HOST_SCHE_RECVGUI_PATH 	"/tmp/schedule_sock"#define HOST_SCHE_RECVTEST_PATH	"/tmp/test_sock"/*base num, for extend*/#define SCHDULERMODULE 0	/*base num of schedule module, security module 1, other test n*/#define TESTMODULE 10#define W11BSECURITYTESTMODULE (TESTMODULE + 1)	/*security test*//*yi zhi xing test*/#define SECURITYSCHDULEMODULE (SCHDULERMODULE +1)	/*security schedule*//*yi zhi xing diaodu*/typedef enum{SUCCESS, ERROR, WARNING, INFO} MsgType;	/*SupportedDriverType dirver_list[] = {	"hostap",	"prism54"	};*//*according this to form the array in the procedure*//*define driver platform support*/#define PLATFORM_DRIVER 0#define HOSTAP "hostap"#define PRISM54 "prism54"#define TEST_ALL	"all"/*define w11b security test items*/#define W11B_AUTHENTICATE_TEST	"authenticate test"#define W11B_ETC					 	"etc"typedef struct _BssInfo{	char ssid[SSIDNAMESIZE];	int ssidLen;	u8 bssid[ETH_ALEN];	char NetType[NETNAMESIZE];	int mode;	int channel;	}BssInfoType;/*user intend to test items below describle*/typedef struct _TestItems{	int testNum;	char netType[NETNAMESIZE];//网络类型	char testType[PLUGIN_TYPE_SIZE];//测试类型, define here	BssInfoType net;//具体网络}TestItemsType;//定义整个软件的的消息类型,以及消息数据结构,便于在各模块间传输typedef struct _MsgStruct{	MsgType msgType;	char SendModuleName[MODULENAMESIZE];		struct MsgSubStructType{		int msgSubType;		union MsgContentType{			TestItemsType schdeuleParam;//according to this to load test module			char msg[MSG_SIZE-4-MODULENAMESIZE-sizeof(MsgType)-4];		}msgContent;	}msgBody;}MsgStructType;//配置文件解析后的数据结构,根据这个数据结构来加载模块。typedef struct _ConfigTestItem{	char *TestItemProtName;//such as w11b, wpa..	char *TestItemTypeName;//such as security test, ..	char *TestItemDesc;		char *configFile;//module load location	struct _ConfigTestItem *next;}ConfigTestItem;#define NETTYPESEIZE 30#define TESTNAMESIZE 30/*hostap mode*/#ifndef IW_MODE_ADHOC#define IW_MODE_ADHOC 1#endif#ifndef IW_MODE_INFRA#define IW_MODE_INFRA 2#endif#ifndef IW_MODE_MASTER//可以桥接的,路由模式#define IW_MODE_MASTER 3#endif#ifndef IW_MODE_REPEAT#define IW_MODE_REPEAT 4#endif#ifndef IW_MODE_SECOND#define IW_MODE_SECOND 5#endif#ifndef IW_MODE_MONITOR#define IW_MODE_MONITOR 6#endif/*support driver types*/// typedef enum{HOSTAP, PRISM54, UNKNOWN} DriverType;typedef struct _PlugInfo{	int StructSize;	int InterfaceID;	char InterfaceName[IFNAMESIZE];	int  PluginID;	char PluginName[PLUGNAMESIZE];		char PluginType[PLUGIN_TYPE_SIZE];	void *hDllIns;	char *plugPrivate[1];}PlugInfoType;// typedef struct _BssInfo// {// 	unsigned char* ssid;// 	int ssid_len;// 	unsigned char  bssid[ETH_ALEN];// 	char           netType[NETNAMSIZ];// 	int mode;//the net mode IW_MODE_ADHOC/IW_MODE_INFRA// }BssInfoType;int QueryPlugin(int PlugID);int QueryPluginInfo(PlugInfoType *hPlugInfo);/*query test module*/int query_test_module_plugin(int plug_id, char *dri_name, char *test_item);#endif

⌨️ 快捷键说明

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