亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? p80211types.c

?? 對于無線網卡采用prism芯片的linux的開源驅動.
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* src/shared/p80211types.c** Defines globally used types in linux-wlan** Copyright (C) 1999 AbsoluteValue Systems, Inc.  All Rights Reserved.* --------------------------------------------------------------------** linux-wlan**   The contents of this file are subject to the Mozilla Public*   License Version 1.1 (the "License"); you may not use this file*   except in compliance with the License. You may obtain a copy of*   the License at http://www.mozilla.org/MPL/**   Software distributed under the License is distributed on an "AS*   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or*   implied. See the License for the specific language governing*   rights and limitations under the License.**   Alternatively, the contents of this file may be used under the*   terms of the GNU Public License version 2 (the "GPL"), in which*   case the provisions of the GPL are applicable instead of the*   above.  If you wish to allow the use of your version of this file*   only under the terms of the GPL and not to allow others to use*   your version of this file under the MPL, indicate your decision*   by deleting the provisions above and replace them with the notice*   and other provisions required by the GPL.  If you do not delete*   the provisions above, a recipient may use your version of this*   file under either the MPL or the GPL.** --------------------------------------------------------------------** Inquiries regarding the linux-wlan Open Source project can be* made directly to:** AbsoluteValue Systems Inc.* info@linux-wlan.com* http://www.linux-wlan.com** --------------------------------------------------------------------** Portions of the development of this software were funded by * Intersil Corporation as part of PRISM(R) chipset product development.** --------------------------------------------------------------------** This file defines the data and functions for handling the linux-wlan* globally recognized data types: OCTETSTR, DISPLAYSTR, INT, BOUNDEDINT,* ENUMINT, INTARRAY, BITARRY, and MACARRAY.** For each type there is a collection of 3 functions, totext_<type>,* fromtext_<type>, and isvalid_<type>.  They all have identical* signatures:**  void p80211_totext_<type>( UINT32 did, UINT8 *itembuf, char *textbuf )*  void p80211_fromtext_<type>( UINT32 did, UINT8 *itembuf, char *textbuf )*  UINT32 p80211_isvalid_<type>( UINT32 did, UINT8 *itembuf )** The idea is that these functions will be called via pointers stored* in the metadata for each item.* Here are some important notes for these functions:*   - all of these functions assume:*       - a valid complete DID as the first argument*       - (for to/fromtext) a valid pointer to a buffer containing *         sufficient memory.*   - All textual representations are "<itemname>=<itemvalue>"*   - All itembufs are pointing to a p80211item_t*   - isvalid functions return:*       0         if item is invalid*	non-zero  if item is valid** NOTE: these functions assume that the argument "itembuf" is a*       data item and whose data field is always the maximum data*       size (i.e. a PSTR255) with the exception of a collection.*       In the case of a collection, the itembuf argument is a*       pointer to a collection data item where the data value field*       is itself a list of data items.*** Additionally, there are functions for converting enumeration values*  from text to binary and back.* --------------------------------------------------------------------*//*================================================================*//* System Includes */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>/*================================================================*//* Project Includes */#include <wlan/wlan_compat.h>#include <wlan/p80211types.h>#include <wlan/p80211meta.h>#include <wlan/p80211metamib.h>#include <wlan/p80211msg.h>/*================================================================*//* Local Constants *//*================================================================*//* Local Macros *//* the following depends on the following defines:	P80211_NOINCLUDESTRINGS - ifdef, all metadata name fields are empty strings */#define MKENUM(name)	\p80211enum_t	MKENUMNAME(name) = \{ \sizeof((p80211enumpair_ ## name)) / sizeof(p80211enumpair_t), \(p80211enumpair_ ## name) \}#ifdef P80211_NOINCLUDESTRINGS#define MKENUMPAIR(n,s)	{ (n), ("") }#else#define MKENUMPAIR(n,s)	{ (n), (s) }#endif#define MKENUMPAIRLIST(name) p80211enumpair_t p80211enumpair_ ## name [] =/*================================================================*//* Local Types *//*================================================================*//* Local Static Definitions *//* too much data in this file, we moved to the bottom for readability *//*================================================================*//* Local Function Declarations *//*================================================================*//* Function Definitions *//*----------------------------------------------------------------* p80211enum_text2int** Returns the numeric value of an enum item given its textual* name and a ptr to the enum struct.** Arguments:*	ep	ptr to enum metadata*	text	textual enum item name** Returns: *	P80211_ENUMBAD		no match on name*	!P80211_ENUMBAD		success, return value is enum value----------------------------------------------------------------*/UINT32 p80211enum_text2int(p80211enum_t *ep, char *text){	UINT32	result = P80211ENUM_BAD;	int		i;	for ( i = 0; i < ep->nitems; i++ ) {		if ( strcmp(text, ep->list[i].name ) == 0 ) {			result = ep->list[i].val;			break;		}	}	return result;}/*----------------------------------------------------------------* p80211enum_int2text** Fills a buffer with the name string for a given integer * quantity and a ptr to the enum struct.** Arguments:*	ep	ptr to enum metadata*	val	integer value to convert*	text	(out)buffer to write enum name to** Returns: *	P80211_ENUMBAD		no match on number*	!P80211_ENUMBAD		success** Side effects:*	Argument 'text' is filled with the textual name of the*	enum value.  If the lookup fails, 'text' is set to the*	string P80211ENUM_BADSTR----------------------------------------------------------------*/UINT32 p80211enum_int2text(p80211enum_t *ep, UINT32 val, char *text){	UINT32	result = P80211ENUM_BAD;	int	i;	strcpy(text, P80211ENUM_BADSTR);	for ( i = 0; i < ep->nitems;  i++) {		if ( ep->list[i].val == val ) {			strcpy( text, ep->list[i].name );			result = val;			break;		}	}	return result;}/*----------------------------------------------------------------* p80211_totext_displaystr** pstr ==> cstr ** Converts a pascal string to a C string appropriate for display.* The C string format  is always  "<item name>=<item value>".** Arguments:*	metalist	pointer to a category metadata list*	did		complete, validated, DID.*	itembuf		item triple {DID, len, value}.*	textbuf		(out) character buffer to receive textual*			representation.** Returns: *	nothing** Side effects:*	Writes the converted value to the buffer pointed at by*	textbuf.----------------------------------------------------------------*/void p80211_totext_displaystr( catlistitem_t *metalist, UINT32 did, UINT8 *itembuf, char *textbuf ){	p80211meta_t	*meta = NULL;	p80211itemd_t	*item = (p80211itemd_t*)itembuf;	p80211pstrd_t	*pstr;	*textbuf = '\0';	if ( (meta = p80211_did2item(metalist, did)) != NULL ) {		/* collect the C string stored in the data item */		if ( item->status == P80211ENUM_msgitem_status_data_ok ) {			pstr = (p80211pstrd_t*)item->data;			if ( item->did != 0UL ) {				sprintf( textbuf, "%s=\'", meta->name);				strncat( textbuf, pstr->data, pstr->len);				strncat( textbuf, "\'", 1);			} else {				sprintf( textbuf, "%s=\'%s\'", meta->name,					NOT_SUPPORTED);			}		} else {			char		error_msg[MSG_BUFF_LEN];			p80211_error2text( item->status, error_msg);			sprintf( textbuf, "%s=\'%s\'", meta->name,				error_msg);		}	} else {		char		error_msg[MSG_BUFF_LEN];		p80211_error2text( P80211ENUM_msgitem_status_invalid_msg_did,			error_msg);		sprintf( textbuf, "0x%08x=\"%s\"", did,			error_msg);	}	return;}/*----------------------------------------------------------------* p80211_fromtext_displaystr** cstr ==> pstr** Converts a C string containing the "<item name>=<item value>" format* to a wlan data item triple.** The C string format  is always  "<item name>=<item value>".** Arguments:*	metalist	pointer to a category metadata list*	did		complete, validated, DID.*	itembuf		(out>item triple {DID, len, value}.*	textbuf		character buffer to receive textual*			representation.** Returns: *	nothing** Side effects:*	Writes the converted value to the buffer pointed at by*	itembuf.----------------------------------------------------------------*/void p80211_fromtext_displaystr( catlistitem_t *metalist, UINT32 did, UINT8 *itembuf, char *textbuf ){	p80211meta_t	*meta = NULL;	p80211itemd_t	*item = (p80211itemd_t*)itembuf;	p80211pstrd_t	*pstr;	int		len;	/* set up the pascal string pointer, i.e. the display str data item */	pstr = (p80211pstrd_t*)item->data;	/* collect the metadata item */	if ( (meta = p80211_did2item(metalist, did)) != NULL ) {		/* set the DID and OR in the partial DID for safety */		item->did = did | meta->did;		/* adding 1 to the metadata maxlen takes into account		the first byte of the pascal string containing the		actual number of data bytes.  NOTE: the '\0' of a display		string is included in the metadata maxlen */		item->len = p80211item_maxdatalen(metalist, item->did);		/* skip past the item name to its value before converting */		textbuf = strchr(textbuf, '=');		if ( textbuf != NULL ) {			/* OK, got the '=', bump to the next */			textbuf++;			len = strlen(textbuf);			if ( len > meta->maxlen ) {				item->status =					P80211ENUM_msgitem_status_string_too_long;			} else if ( len < meta->minlen ) {				item->status =					P80211ENUM_msgitem_status_string_too_short;			} else {				pstr->len = len;				strncpy( pstr->data, textbuf, len);				item->status =					P80211ENUM_msgitem_status_data_ok;			}		} else {		/* bogus text string, set the item to an empty string */			pstr->len = 0;			item->status = P80211ENUM_msgitem_status_missing_itemdata;		}	} else {		pstr->len = 0;		pstr->data[0] = '\0';		item->did = did;		item->len = pstr->len + 1;		item->status = P80211ENUM_msgitem_status_invalid_itemname;	}	return;}/*----------------------------------------------------------------* p80211_isvalid_displaystr** Tests an item triple for valid range.  Uses the validation* information in the metadata.  Displaystr's are validated for* length.** Arguments:*	metalist	pointer to a category metadata list*	did		complete, validated, DID.*	itembuf		item triple {DID, len, value}.** Returns: *	0	- data in itembuf is invalid*	~0	- data in itembuf is valid----------------------------------------------------------------*/UINT32 p80211_isvalid_displaystr( catlistitem_t *metalist, UINT32 did, UINT8 *itembuf ){	UINT32		result = 0;	p80211meta_t	*meta;	p80211itemd_t	*item = (p80211itemd_t*)itembuf;	p80211pstrd_t	*pstr;	if ( (item->status) == P80211ENUM_msgitem_status_data_ok ) {		if ( (meta = p80211_did2item(metalist, did)) != NULL ) {			/* set up the pointers */			pstr = (p80211pstrd_t*)item->data;			if ( pstr->len < meta->minlen ) {				item->status =					P80211ENUM_msgitem_status_string_too_short;			} else if ( pstr->len > meta->maxlen ) {				item->status =					P80211ENUM_msgitem_status_string_too_long;			} else {				result =1;			}		} else {			item->status = P80211ENUM_msgitem_status_invalid_did;		}	}	return result;}/*----------------------------------------------------------------* p80211_totext_octetstr** pstr ==> "xx:xx:..."** Converts a pascal string to a hex represenation of its contents.* The C string format is always  "<item name>=<item value>".** Arguments:*	metalist	pointer to a category metadata list*	did		complete, validated, DID.*	itembuf		item triple {DID, len, value}.*	textbuf		(out) character buffer to receive textual*			representation.** Returns: *	nothing** Side effects:*	Writes the converted value to the buffer pointed at by*	textbuf.----------------------------------------------------------------*/void p80211_totext_octetstr( catlistitem_t *metalist, UINT32 did, UINT8 *itembuf, char *textbuf ){	p80211meta_t	*meta = NULL;	p80211itemd_t	*item = (p80211itemd_t*)itembuf;	p80211pstrd_t	*pstr;	UINT8		*cstr;	INT		len;	INT		n;	*textbuf = '\0';	/* collect the metadata item */	if ( (meta = p80211_did2item(metalist, did)) != NULL ) {		if ( item->status == P80211ENUM_msgitem_status_data_ok ) {			/* collect the C string stored in the data item */			pstr = (p80211pstrd_t*)item->data;			if ( item->did != 0UL ) {				len = pstr->len;				cstr = pstr->data;				sprintf( textbuf, "%s=", meta->name);				for ( n=0; n < len; n++ ) {					sprintf( &textbuf[strlen(textbuf)],						"%02x:", (UINT)(cstr[n]) );				}				/* get rid of trailing colon */				textbuf[strlen(textbuf) - 1] = '\0';			} else {				sprintf( textbuf, "%s=%s", meta->name,					NOT_SUPPORTED);			}		} else {			char		error_msg[MSG_BUFF_LEN];			p80211_error2text( item->status, error_msg);			sprintf( textbuf, "%s=\"%s\"", meta->name,				error_msg);		}	} else {		char		error_msg[MSG_BUFF_LEN];		p80211_error2text( P80211ENUM_msgitem_status_invalid_msg_did,			error_msg);		sprintf( textbuf, "0x%08x=\"%s\"", did,			error_msg);	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产a精品视频| 国产日韩欧美在线一区| 亚洲成人一区二区在线观看| 波多野结衣亚洲| 日韩免费成人网| 国产一区二区三区香蕉| 精品免费视频一区二区| 精品一区二区影视| 国产精品久久久久影院色老大| 久久91精品久久久久久秒播| 精品国产自在久精品国产| 日韩1区2区日韩1区2区| 久久久久久久久久久久久女国产乱| 狠狠色狠狠色综合日日91app| 精品美女被调教视频大全网站| 精品一区二区三区在线播放视频| 国产精品青草久久| 色综合天天综合网国产成人综合天| 亚洲欧美中日韩| 91在线免费播放| 性感美女久久精品| 欧美一区二区三区成人| 久久国产麻豆精品| 亚洲欧美影音先锋| 在线观看视频欧美| 日韩电影网1区2区| 久久久精品天堂| 欧美影院一区二区三区| 免费观看在线综合| 中文字幕免费不卡在线| 波多野结衣在线一区| 亚洲精品国产高清久久伦理二区| 欧美卡1卡2卡| 国产成人精品一区二| 午夜精品久久久久| 久久免费的精品国产v∧| 成人福利在线看| 成人免费在线播放视频| 欧美不卡一区二区三区| 97久久人人超碰| 日本亚洲视频在线| 一区二区三区美女| 国产夜色精品一区二区av| 亚洲国产精品成人久久综合一区 | 亚洲h精品动漫在线观看| 久久国产精品一区二区| 不卡一卡二卡三乱码免费网站| 欧美一区二区三区不卡| 亚洲天堂中文字幕| 国产一区不卡在线| 欧美伦理电影网| 亚洲欧美国产77777| 久久99精品国产麻豆不卡| aaa欧美色吧激情视频| 中文字幕在线视频一区| 99久久免费国产| 麻豆中文一区二区| 国产成人日日夜夜| 欧美一区二区三区四区高清| 国产精品色哟哟| 成人免费观看视频| 亚洲一区二区三区免费视频| 久久久久久久综合色一本| 国产视频一区在线观看 | 国产片一区二区三区| 欧美日韩亚洲综合| 激情av综合网| 三级欧美韩日大片在线看| 亚洲免费观看在线观看| 国产午夜亚洲精品午夜鲁丝片| 日韩手机在线导航| 欧美精品黑人性xxxx| 99riav一区二区三区| 国产精品资源网| 首页国产欧美日韩丝袜| 91精品中文字幕一区二区三区| 一区二区三区四区精品在线视频 | 欧美日韩综合在线免费观看| 亚洲免费av网站| 欧美日韩和欧美的一区二区| 久久国内精品视频| 国产精品理论在线观看| 欧美精品欧美精品系列| 黄色日韩网站视频| 欧美精品v国产精品v日韩精品 | 麻豆精品精品国产自在97香蕉| 一区二区三区久久久| 91福利在线看| 一区二区三区四区五区视频在线观看| 欧洲精品在线观看| 色域天天综合网| 欧美乱熟臀69xxxxxx| 亚洲自拍偷拍欧美| 成人午夜精品一区二区三区| 成人午夜在线播放| 国产精品亚洲人在线观看| 欧美中文字幕不卡| 欧美一区午夜视频在线观看| 欧美一区二区三区在线看| 精品国产一区二区三区不卡| 中日韩免费视频中文字幕| 亚洲欧美一区二区久久| 日韩二区三区四区| 国产大陆亚洲精品国产| 欧洲av一区二区嗯嗯嗯啊| 日韩欧美一区二区久久婷婷| 亚洲国产精品黑人久久久| 亚洲国产一区在线观看| 狠狠网亚洲精品| 色综合天天性综合| 69av一区二区三区| 国产精品视频一二三区| 日韩av中文字幕一区二区| 国产精品18久久久久久vr| 91麻豆6部合集magnet| 日韩欧美国产一二三区| 亚洲欧美成人一区二区三区| 亚洲777理论| 成人激情免费视频| 91精品国产综合久久久久 | 欧美群妇大交群中文字幕| 久久久久久9999| 亚洲影院免费观看| 国产精品影视网| 538prom精品视频线放| 最新日韩av在线| 久久超碰97中文字幕| 91色九色蝌蚪| 国产欧美一区视频| 毛片一区二区三区| 欧美日韩高清在线播放| 亚洲欧美另类小说| 亚洲激情校园春色| 久久99国产精品尤物| 91福利资源站| 久久精品视频一区二区| 美腿丝袜在线亚洲一区| 欧美制服丝袜第一页| 中文字幕中文乱码欧美一区二区 | 樱桃视频在线观看一区| 国产大陆亚洲精品国产| 日韩欧美专区在线| 亚洲午夜免费视频| 99久久免费视频.com| 久久精品在这里| 久久91精品久久久久久秒播| 9191久久久久久久久久久| 一个色妞综合视频在线观看| www.66久久| 国产精品初高中害羞小美女文| 91丨porny丨户外露出| 久久久蜜桃精品| 国产自产视频一区二区三区| 日韩一区二区视频| 奇米在线7777在线精品| 在线不卡免费欧美| 亚洲综合在线电影| 欧美精品一区二区三区蜜桃| 成人污污视频在线观看| 欧美成人性福生活免费看| 日韩一区精品视频| 欧美日韩一本到| 亚洲国产欧美日韩另类综合 | 国产精品77777竹菊影视小说| 日韩欧美国产三级电影视频| 日本aⅴ亚洲精品中文乱码| 欧美一区二区在线播放| 日本不卡高清视频| 欧美一级午夜免费电影| 日韩精彩视频在线观看| 日韩免费电影一区| 国产乱色国产精品免费视频| 国产亚洲成aⅴ人片在线观看 | 91福利在线观看| 亚洲第一福利一区| 69久久夜色精品国产69蝌蚪网| 日韩av不卡一区二区| 欧美成人欧美edvon| 国产成人无遮挡在线视频| 国产精品久久久久国产精品日日| 99视频一区二区| 亚洲精品国产无天堂网2021| 欧美日韩国产另类不卡| 九九视频精品免费| 中文字幕精品三区| 色老汉一区二区三区| 日韩国产成人精品| 精品国产1区二区| 9久草视频在线视频精品| 一二三四社区欧美黄| 69堂国产成人免费视频| 国产精品69久久久久水密桃| 中文字幕中文字幕一区二区| 欧美在线视频你懂得| 日本不卡视频一二三区| 国产女人aaa级久久久级| 一本久久精品一区二区| 日韩和欧美一区二区| 久久蜜桃av一区二区天堂| 97久久精品人人做人人爽50路|