p80211types.h

来自「Linux的无线局域网方案是一个Linux设备驱动程序和子系统 一揽子方案的用」· C头文件 代码 · 共 700 行 · 第 1/2 页

H
700
字号
#define P80211DID_ISTABLE(a)	P80211DID_GET(a, \					P80211DID_MASK_ISTABLE, \					P80211DID_LSB_ISTABLE)#define P80211DID_ACCESS(a)	P80211DID_GET(a, \					P80211DID_MASK_ACCESS, \					P80211DID_LSB_ACCESS)/*================================================================*//* Types *//*----------------------------------------------------------------*//* The following structure types are used for the represenation *//*  of ENUMINT type metadata. */typedef struct p80211enumpair{	UINT32			val;	char			*name;} p80211enumpair_t;typedef struct p80211enum{	INT			nitems;	p80211enumpair_t	*list;} p80211enum_t;/*----------------------------------------------------------------*//* The following structure types are used to store data items in *//*  messages. *//* Template pascal string */__WLAN_PRAGMA_PACK1__typedef struct p80211pstr{	UINT8		len								__WLAN_ATTRIB_PACK__;			} __WLAN_ATTRIB_PACK__ p80211pstr_t;__WLAN_PRAGMA_PACKDFLT____WLAN_PRAGMA_PACK1__typedef struct p80211pstrd{	UINT8		len			__WLAN_ATTRIB_PACK__;				UINT8		data[0]			__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211pstrd_t;__WLAN_PRAGMA_PACKDFLT__/* Maximum pascal string */__WLAN_PRAGMA_PACK1__typedef struct p80211pstr255{	UINT8		len			__WLAN_ATTRIB_PACK__;	UINT8		data[MAXLEN_PSTR255]	__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211pstr255_t;__WLAN_PRAGMA_PACKDFLT__/* pascal string for macaddress and bssid */__WLAN_PRAGMA_PACK1__typedef struct p80211pstr6{	UINT8		len			__WLAN_ATTRIB_PACK__;	UINT8		data[MAXLEN_PSTR6]	__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211pstr6_t;__WLAN_PRAGMA_PACKDFLT__/* pascal string for channel list */__WLAN_PRAGMA_PACK1__typedef struct p80211pstr14{	UINT8		len			__WLAN_ATTRIB_PACK__;	UINT8		data[MAXLEN_PSTR14]	__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211pstr14_t;__WLAN_PRAGMA_PACKDFLT__/* pascal string for ssid */__WLAN_PRAGMA_PACK1__typedef struct p80211pstr32{	UINT8		len			__WLAN_ATTRIB_PACK__;	UINT8		data[MAXLEN_PSTR32]	__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211pstr32_t;__WLAN_PRAGMA_PACKDFLT__/* MAC address array */__WLAN_PRAGMA_PACK1__typedef struct p80211macarray{	UINT32		cnt			__WLAN_ATTRIB_PACK__;	UINT8		data[1][MAXLEN_PSTR6]	__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211macarray_t;__WLAN_PRAGMA_PACKDFLT__/* prototype template */__WLAN_PRAGMA_PACK1__typedef struct p80211item{	UINT32		did			__WLAN_ATTRIB_PACK__;	UINT16		status			__WLAN_ATTRIB_PACK__;	UINT16		len			__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_t;__WLAN_PRAGMA_PACKDFLT__/* prototype template w/ data item */__WLAN_PRAGMA_PACK1__typedef struct p80211itemd{	UINT32		did			__WLAN_ATTRIB_PACK__;	UINT16		status			__WLAN_ATTRIB_PACK__;	UINT16		len			__WLAN_ATTRIB_PACK__;	UINT8		data[0]			__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211itemd_t;__WLAN_PRAGMA_PACKDFLT__/* message data item for INT, BOUNDEDINT, ENUMINT */__WLAN_PRAGMA_PACK1__typedef struct p80211item_uint32{	UINT32		did			__WLAN_ATTRIB_PACK__;	UINT16		status			__WLAN_ATTRIB_PACK__;	UINT16		len			__WLAN_ATTRIB_PACK__;	UINT32		data			__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_uint32_t;__WLAN_PRAGMA_PACKDFLT__/* message data item for OCTETSTR, DISPLAYSTR */__WLAN_PRAGMA_PACK1__typedef struct p80211item_pstr6{	UINT32		did			__WLAN_ATTRIB_PACK__;	UINT16		status			__WLAN_ATTRIB_PACK__;	UINT16		len			__WLAN_ATTRIB_PACK__;	p80211pstr6_t	data			__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_pstr6_t;__WLAN_PRAGMA_PACKDFLT__/* message data item for OCTETSTR, DISPLAYSTR */__WLAN_PRAGMA_PACK1__typedef struct p80211item_pstr14{	UINT32			did		__WLAN_ATTRIB_PACK__;	UINT16			status		__WLAN_ATTRIB_PACK__;	UINT16			len		__WLAN_ATTRIB_PACK__;	p80211pstr14_t		data		__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_pstr14_t;__WLAN_PRAGMA_PACKDFLT__/* message data item for OCTETSTR, DISPLAYSTR */__WLAN_PRAGMA_PACK1__typedef struct p80211item_pstr32{	UINT32			did		__WLAN_ATTRIB_PACK__;	UINT16			status		__WLAN_ATTRIB_PACK__;	UINT16			len		__WLAN_ATTRIB_PACK__;	p80211pstr32_t		data		__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_pstr32_t;__WLAN_PRAGMA_PACKDFLT__/* message data item for OCTETSTR, DISPLAYSTR */__WLAN_PRAGMA_PACK1__typedef struct p80211item_pstr255{	UINT32			did		__WLAN_ATTRIB_PACK__;	UINT16			status		__WLAN_ATTRIB_PACK__;	UINT16			len		__WLAN_ATTRIB_PACK__;	p80211pstr255_t		data		__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_pstr255_t;__WLAN_PRAGMA_PACKDFLT__/* message data item for UNK 392, namely mib items */typedef struct  p80211item_unk392{	UINT32		did				__WLAN_ATTRIB_PACK__;	UINT16		status				__WLAN_ATTRIB_PACK__;	UINT16		len				__WLAN_ATTRIB_PACK__;	UINT8		data[MAXLEN_MIBATTRIBUTE]	__WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ p80211item_unk392_t;__WLAN_PRAGMA_PACK1__/* message data item for UNK 1025, namely p2 pdas */typedef struct  p80211item_unk1024{	UINT32		did				__WLAN_ATTRIB_PACK__;	UINT16		status				__WLAN_ATTRIB_PACK__;	UINT16		len				__WLAN_ATTRIB_PACK__;	UINT8		data[1024]			__WLAN_ATTRIB_PACK__;}  __WLAN_ATTRIB_PACK__ p80211item_unk1024_t;__WLAN_PRAGMA_PACK1__/* message data item for UNK 4096, namely p2 download chunks */typedef struct  p80211item_unk4096{	UINT32		did				__WLAN_ATTRIB_PACK__;	UINT16		status				__WLAN_ATTRIB_PACK__;	UINT16		len				__WLAN_ATTRIB_PACK__;	UINT8		data[4096]			__WLAN_ATTRIB_PACK__;}  __WLAN_ATTRIB_PACK__ p80211item_unk4096_t;__WLAN_PRAGMA_PACK1__struct catlistitem;/*----------------------------------------------------------------*//* The following structure type is used to represent all of the *//*  metadata items.  Some components may choose to use more, *//*  less or different metadata items. */typedef void (*p80211_totext_t)( struct catlistitem *, UINT32 did, UINT8* itembuf, char *textbuf);typedef void (*p80211_fromtext_t)( struct catlistitem *, UINT32 did, UINT8* itembuf, char *textbuf);typedef UINT32 (*p80211_valid_t)( struct catlistitem *, UINT32 did, UINT8* itembuf);/*================================================================*//* Extern Declarations *//*----------------------------------------------------------------*//* Enumeration Lists *//*  The following are the external declarations *//*  for all enumerations  */extern p80211enum_t MKENUMNAME(truth); extern p80211enum_t MKENUMNAME(ifstate); extern p80211enum_t MKENUMNAME(powermgmt);extern p80211enum_t MKENUMNAME(bsstype);extern p80211enum_t MKENUMNAME(authalg);extern p80211enum_t MKENUMNAME(phytype);extern p80211enum_t MKENUMNAME(temptype);extern p80211enum_t MKENUMNAME(regdomain);extern p80211enum_t MKENUMNAME(ccamode);extern p80211enum_t MKENUMNAME(diversity);extern p80211enum_t MKENUMNAME(scantype);extern p80211enum_t MKENUMNAME(resultcode);extern p80211enum_t MKENUMNAME(reason);extern p80211enum_t MKENUMNAME(status);extern p80211enum_t MKENUMNAME(msgcode);extern p80211enum_t MKENUMNAME(msgitem_status);/*================================================================*//* Function Declarations *//*----------------------------------------------------------------*//* The following declare some utility functions for use with the *//*  p80211enum_t type. */UINT32 p80211enum_text2int(p80211enum_t *ep, char *text);UINT32 p80211enum_int2text(p80211enum_t *ep, UINT32 val, char *text);void p80211_error2text(int err_code, char *err_str);/*----------------------------------------------------------------*//* The following declare some utility functions for use with the *//*  p80211item_t and p80211meta_t types. *//*----------------------------------------------------------------*//* The following declare functions that perform validation and    *//* text to binary conversions based on the metadata for interface *//* and MIB data items.                                            *//*----------------------------------------------------------------*//*-- DISPLAYSTR ------------------------------------------------------*//* pstr ==> cstr */void p80211_totext_displaystr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* cstr ==> pstr */void p80211_fromtext_displaystr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of a displaystr binary value */UINT32 p80211_isvalid_displaystr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- OCTETSTR --------------------------------------------------------*//* pstr ==> "xx:xx:...." */void p80211_totext_octetstr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* "xx:xx:...." ==> pstr */void p80211_fromtext_octetstr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of an octetstr binary value */UINT32 p80211_isvalid_octetstr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- BOUNDEDINT ------------------------------------------------------*//* UINT32 ==> %d */void p80211_totext_boundedint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* %d ==> UINT32 */void p80211_fromtext_boundedint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of a boundedint's binary value */UINT32 p80211_isvalid_boundedint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- INT -------------------------------------------------------------*//* UINT32 ==> %d */void p80211_totext_int( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* %d ==> UINT32 */void p80211_fromtext_int( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of an int's binary value (always successful) */UINT32 p80211_isvalid_int( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- ENUMINT ---------------------------------------------------------*//* UINT32 ==> <valuename> */void p80211_totext_enumint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* <valuename> ==> UINT32 */void p80211_fromtext_enumint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of an enum's binary value */UINT32 p80211_isvalid_enumint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- INTARRAY --------------------------------------------------------*//* UINT32[] => %d,%d,%d,... */void p80211_totext_intarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* %d,%d,%d,... ==> UINT32[] */void p80211_fromtext_intarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of an integer array's value */UINT32 p80211_isvalid_intarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- BITARRAY --------------------------------------------------------*//* UINT32 ==> %d,%d,%d,... */void p80211_totext_bitarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* %d,%d,%d,... ==> UINT32 */void p80211_fromtext_bitarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of a bit array's value */UINT32 p80211_isvalid_bitarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- MACARRAY --------------------------------------------------------*/void p80211_totext_macarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );void p80211_fromtext_macarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of a MAC address array's value */UINT32 p80211_isvalid_macarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );/*-- MIBATTRIUBTE ------------------------------------------------------*//* <mibvalue> ==> <textual representation identified in MIB metadata> */void p80211_totext_getmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );void p80211_totext_setmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* <textual representation identified in MIB metadata> ==> <mibvalue> */void p80211_fromtext_getmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );void p80211_fromtext_setmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );/* function that checks validity of a mibitem's binary value */UINT32 p80211_isvalid_getmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );UINT32 p80211_isvalid_setmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );#endif /* _P80211TYPES_H */

⌨️ 快捷键说明

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