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

📄 hostap_filter.h

📁 该系统是基于Linux平台的WLAN应用
💻 H
字号:
#ifndef _HOSTAP_FILTER_H
#define _HOSTAP_FILTER_H

//#define MANAGEMENT_FRAME_SIZE 16
//#define CONTROL_FARME_SIZE 16
//#define DATA_FRAME_SIZE 16

typedef unsigned char u8;
typedef unsigned short u16;
//only one type , 0 for mtgmt, 1 for control, 2 for data, 3 for nothing
typedef struct filter{
	u8 type_num;//how many types, 0xff indicate no type
	u8 stype_num;
	u8 stype_num_tmp;//make for get cfg
	u8 has_src_mac;
	u8 has_dst_mac;
	u8 stype[16];
	u8  mag_type;//0 indicate no management, 1 indicate have one , 2 indicate two, ff indicate all
	u8 mag_stype[16];//[MANAGEMENT_FRAME_SIZE];
	
	u8 ctl_type;
	u8 ctl_stype[16];//[CONTROL_FRAME_SIZE];

	u8 data_type;
	u8 data_stype[16];//[DATA_FRAME_SIZE];
	
	u8 src_mac[6];
	u8 dst_mac[6];
}filter_t;


#define CFG_BLOCK_TYPE_NUM 6
#define CFG_BLOCK_TYPE_TYPE 0
#define CFG_BLOCK_TYPE_SA 1 
#define CFG_BLOCK_TYPE_DA 2
#define CFG_BLOCK_TYPE_STYPE 3 
#define CFG_BLOCK_TYPE_FALSE 4
#define CFG_BLOCK_TYPE_TRUE 5

#define BYTE_TYPE 0
#define BIT_TYPE 1

typedef struct _cfg_block{
	u8 type;// 0 indicate type, 1 indicate stype, 2 indicaate da, 3 indicate ra, 4 indicate false, 5 indicate true, defined above
//	u8 des[32];
	
	u8 byte_or_bit;// 0 for byte, 1 for bit
	
	u16 byte_offset;
	u8 bytes;
	u16 bit_offset;
	u8 bits;
	struct _cfg_block *left;
	struct _cfg_block *right;
	union value_u{
		u8 value_type;
		u8 value_mac[6];
	}value;//this node's value

}cfg_block_t;

#endif

⌨️ 快捷键说明

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