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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? main.c

?? Linux Wireless LAN Project 的目標是開發(fā)一個完整的
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*    Linux WLAN     The contents of this file are subject to the Mozilla Public    License Version 1.0 (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.    The initial developer of the original code is Mark S. Mathews    <mark@absoval.com>.  Portions created by Mark S. Mathews    are Copyright (C) 1998 AbsoluteValue Software, Inc.  All Rights Reserved.    */#include <stdlib.h>#include <stdio.h>#include <string.h>/* Ugly hack for LinuxPPC R4, don't have time to figure it out right now */#if defined(_ARCH_PPC)#undef __GLIBC__#endif#include <sys/socket.h>#include <sys/types.h>#include <sys/ioctl.h>#include <wlan/version.h>#include <wlan/wlan_compat.h>#include <wlan/am930mib.h>#include <wlan/wlan_ioctl.h>#include "wlanctl.h"#include "prmib.h"int		getmib( int fd, char *interface, UINT32 mibcode );void	pr_netlist(wlan_netlist_t *list);int		process_bsscreate( int fd, int argc, char **argv );int		process_bssjoin( int fd, int argc, char **argv );int		process_getmib( int fd, int argc, char **argv );int		process_netlist( int fd, int argc, char **argv );int		process_scan( int fd, int argc, char **argv );int		process_privacy( int fd, int argc, char **argv );int		process_ethconv( int fd, int argc, char **argv );int		process_authen( int fd, int argc, char **argv );int		process_assoc( int fd, int argc, char **argv );void	strtoUINT48( UINT8 *a, char *s );void	strtoUINT40( UINT8 *a, char *s );void	usage(void);char appname[MAX_APPNAME_LEN + 1];int main(int argc, char *argv[]){	int result = 0;	int fd;	wlan_req_t	req;	strcpy( appname, APPNAME );	if ( argc >=  2 )	{				if ( strcasecmp(argv[1], "version") == 0 )		{			printf("%s version " WLAN_RELEASE "\n", appname);			return result;		}		/* get a socket */		fd = socket(AF_INET, SOCK_STREAM, 0);		if ( fd != -1 )		{			/* Test that there is a card */			strcpy( req.name, argv[1]);			req.result = 0;			req.data = NULL;			req.len = 0;			result = ioctl( fd, WLAN_TEST, &req);			if (result < 0)			{				fprintf(stderr, "%s: ioctl failed testing interface \'%s\'\n",						appname, argv[1]);				fprintf(stderr, "interface \'%s\' is probably an invalid wireless network interface name\n", argv[1] );				fprintf(stderr, "OR a wireless card is not inserted in the specified interface\n");			}			else			{				if ( req.result == 0xf0f0 )				{					/* now, what does the user want? */					if ( argc > 2 )					{						/* ok, there's more arguments */						if ( strcasecmp(argv[2], SCAN) == 0 )						{						   result = process_scan(fd, argc, argv);						}						else if ( strcasecmp(argv[2], NETLIST) == 0 )						{						   result = process_netlist(fd, argc, argv);						}						else if ( strcasecmp(argv[2], BSSCREATE) == 0 )						{						   result = process_bsscreate(fd, argc, argv);						}						else if ( strcasecmp(argv[2], BSSJOIN) == 0 )						{						   result = process_bssjoin(fd, argc, argv);						}						else if ( strcasecmp(argv[2], GETMIB) == 0 )						{						   result = process_getmib(fd, argc, argv);						}						else if ( strcasecmp(argv[2], PRIVACY) == 0 )						{						   result = process_privacy(fd, argc, argv);						}						else if ( strcasecmp(argv[2], ETHCONV) == 0 )						{						   result = process_ethconv(fd, argc, argv);						}						else if ( strcasecmp(argv[2], AUTHEN) == 0 )						{						   result = process_authen(fd, argc, argv);						}						else if ( strcasecmp(argv[2], ASSOC) == 0 )						{						   result = process_assoc(fd, argc, argv);						}						else if ( strcasecmp(argv[2], "getmibitem") == 0 )						{							fprintf(stderr, "%s: cmd currently unsupported\n", 									appname);						}						else if ( strcasecmp(argv[2], "setmibitem") == 0 )						{							fprintf(stderr, "%s: cmd currently unsupported\n", 									appname);						}						else						{							fprintf(stderr, "%s: %s is an invalid command\n",									appname, argv[2]);							usage();							result = 1;						}					}					else					{						/* ok, we just want a general status msg */						/* maybe some stats, joined?, ESSID, BSSID etc. */						printf("some general stats\n");					}				}				else				{					fprintf(stderr,"%s: ioctl successful but driver not responding!\n", appname);					result = 1;				}			}		}		else		{			fprintf(stderr, "%s: No appropriate sockets!\n", appname);			result = 1;		}	}	else	{		usage();		result = 1;	}	return result;}/*----------------------------------------------------------------*	getmib**	Called by process_getmib when the user has specified the 'getmib'*	command on the command line.**	This function does the actual read the contents of one or more Managment*	Information Block (MIB) structures from the specified wireless*	network device and display the values.  Issuing just the getmib*   command to wlanctl displays ALL MIB's.  Otherwise, a particular*   MIB is specified following the getmib command.*   *   Valid MIB values are:*		0x00 for local mib*		0x02 for address mib*		0x03 for mac (media access control) mib*		0x04 for statistics mib*		0x05 for managment mib*		0x07 for physical mib*	Arguments:*		fd 		- socket file descriptor*		argc  	- the argument count passed to main *		argv	- the argument list passed to main **	returns: 0 if successful, not 0 otherwise*----------------------------------------------------------------*/int  getmib( int fd, char *interface, UINT32 mibcode ){	wlan_req_t 		req;	wlan_getmib_t	mib;	int 			result;	strcpy( req.name, interface);	req.len = sizeof(wlan_getmib_t);	req.data = &mib;	req.result = 0;	mib.mibcode = mibcode;	result = 0;	switch (mibcode)	{		case SUMIB_LOCAL:			if ( (result = ioctl( fd, WLAN_GETMIB, &req)) == 0 )			{				prlocalmib( &mib.data.local ); 			}			else			{				fprintf(stderr, "%s: ioctl failed for mibcode 0x%02lx.\n", appname, mibcode);			}			break;		case SUMIB_ADDR:			if ( (result = ioctl( fd, WLAN_GETMIB, &req)) == 0 )			{				praddrmib( &mib.data.addr ); 			}			else			{				fprintf(stderr, "%s: ioctl failed for mibcode 0x%02lx.\n", appname, mibcode);			}			break;		case SUMIB_MAC:			if ( (result = ioctl( fd, WLAN_GETMIB, &req)) == 0 )			{				prmacmib( &mib.data.mac ); 			}			else			{				fprintf(stderr, "%s: ioctl failed for mibcode 0x%02lx.\n", appname, mibcode);			}			break;		case SUMIB_STAT:			if ( (result = ioctl( fd, WLAN_GETMIB, &req)) == 0 )			{				prstatsmib( &mib.data.stats ); 			}			else			{				fprintf(stderr, "%s: ioctl failed for mibcode 0x%02lx.\n", appname, mibcode);			}			break;		case SUMIB_MGMT:			if ( (result = ioctl( fd, WLAN_GETMIB, &req)) == 0 )			{				prmgmtmib( &mib.data.mgmt ); 			}			else			{				fprintf(stderr, "%s: ioctl failed for mibcode 0x%02lx.\n", appname, mibcode);			}			break;		case SUMIB_PHY:			if ( (result = ioctl( fd, WLAN_GETMIB, &req)) == 0 )			{				prphymib( &mib.data.phy ); 			}			else			{				fprintf(stderr, "%s: ioctl failed for mibcode 0x%02lx.\n", appname, mibcode);			}			break;		default:			fprintf(stderr, "%s: invalid mibcode of 0x%02lx.\n", appname, mibcode);			result = 1;			break;	}	return result;}/*----------------------------------------------------------------*	usage**	This function displays the proper syntax of the wlanctl utility.**	Arguments:*		no arguments**	returns: function doesn't return anything*----------------------------------------------------------------*/void usage(void){	printf("\n%s : control utility for am79C930 based DS wlan cards\n", appname);	printf("   usage: %s interface|version [cmd [cmdarg ...]]\n\n", appname);	printf("          where \"interface\" is the name of a wireless\n");	printf("          network interface.  Running 'ifconfig' will list\n");	printf("          all network interfaces.\n\n");	printf("          Refer to wlanctl man page for more details.\n\n");}/*----------------------------------------------------------------*	strtoUINT40**	This function converts a character string that represents an*	a 40 bit quantity.**	Arguments:*		a	- 40 bit buffer*		s	- character string representing a 40 key quantity**	returns: function doesn't return anything*----------------------------------------------------------------*/void strtoUINT40( UINT8 *a, char *s ){	char	*p;	int		i;	UINT	val;	for ( i = 0; i < 4; i++)	{		p = strchr( s, ':');		if ( p == NULL )		{			fprintf(stderr, "%s: UINT48 format error!\n", appname);			exit(1);		}		else		{			*p = '\0';			sscanf( s, "%x", &val);			a[i] = (UINT8)val;			s = p+1;		}	}	sscanf( s, "%x", &val);	a[i] = (UINT8)val;}/*----------------------------------------------------------------*	strtoUINT48**	This function converts a character string that represents an*	IEEE 802 address into an unsigned 48 bit number.**	Arguments:*		a	- IEEE 802 48 bit address*		s	- character string representing a 48 bit IEEE 802 address**	returns: function doesn't return anything*----------------------------------------------------------------*/void strtoUINT48( UINT8 *a, char *s ){	char	*p;	int		i;	UINT	val;	for ( i = 0; i < 5; i++)	{		p = strchr( s, ':');		if ( p == NULL )		{			fprintf(stderr, "%s: UINT48 format error!\n", appname);			exit(1);		}		else		{			*p = '\0';			sscanf( s, "%x", &val);			a[i] = (UINT8)val;			s = p+1;		}	}	sscanf( s, "%x", &val);	a[i] = (UINT8)val;}/*----------------------------------------------------------------*	pr_netlist**	Called when the user has requested the 'netlist' command at the*	command line.**	This function will traverse the list of BSS's in the network*	list and print the channel, the bssid, the beacon interval,*	the capabilities information, and the ssid for each BSS.**	Arguments:*		list	- network list containing all current BSS's***	returns: function doesn't return anything*----------------------------------------------------------------*/void pr_netlist(wlan_netlist_t *list){	int 			i;	char 			buf[80];	wlan_ie_ssid_t *ie;	for ( i = 0; i < list->nitems; i++)	{/*		printf("ch  bssid              bcn   cap_info  ssid\n");		printf("------------------------------------------------------\n"); */		printf("%02d  ", list->netlist[i].channel);		mac2str( list->netlist[i].bssid, buf);		printf("%s  ", buf);		printf("%04d  ", list->netlist[i].bcn_int);		printf("0x%04x  ", list->netlist[i].cap_info);		ie = (wlan_ie_ssid_t*)list->netlist[i].ssid;		memcpy(buf, ie->ssid, ie->len);		buf[ie->len] = '\0';		printf("%s\n", buf);	}}/*----------------------------------------------------------------*	process_scan**	Called when the user has requested the 'scan' command at the*	command line.**	This function will scan the range of channels beginning and*	ending with	"start" channel and "end" channel repsectively*	for the specified basic service set id (BSSID).  The user*	must specify the starting and ending channels to scan, how*	long to scan on each channel, what BSS to scan for, the BSS*   type and the scan type.*   *	When complete, issuing the "netlist" command will display the*	list of BSS's found as a result of the scan.**	Arguments:*		fd 		- socket file descriptor*		argc  	- the argument count passed to main *		argv	- the argument list passed to main **	The arguments for the wlanctl scan command as they should appear*	on the command line in the following order are:*		name - name of wireless network interface *       cmd - wlanctl command being called, in this case, it is 'scan'*		startch - first channel to start scan*		endch - last channel to scan*		timech - time, in microseconds, to scan each channel*		bssid - a colon separated IEEE 802 address indicating which*				bss to scan for.  An address of ff:ff:ff:ff:ff:ff*				scans for ALL bss's.*		bsstype - specifies the type of bss to scan for.  Valid values*				are "ind", "infr" or both, where "ind" is an independent*				bss, namely funtioning in ad-hoc mode, and "infr" is*				an infrastructure bss, namely we're scanning for access points.*				Note that both "ind" and "infr" bss's can be operable*				simultaneously; hence, the scan for "both".*		scantype - specifies the type of scan to perform: active or passive*				active - sends out probe requests expecting a probe response*				passive - listens for beacons without sending probe requests*		ssid - "Service Set Identifier": a string (with a maximum*			length of 15 characters) that identifies the new BSS.*			This is not to be confused with the BSSID, namely the*			IEEE 802 48 bit address.**	returns: 0 if successful, not 0 otherwise*----------------------------------------------------------------*/int process_scan( int fd, int argc, char **argv ){	int			result;	result = 0;	if ( argc < 10 )	{		fprintf(stderr, "%s: not enough arguments for scan command; ",				appname);		fprintf(stderr, "see wlanctl man page.\n");		usage();	}	else	{		wlan_req_t	req;		wlan_scan_t cmd;		strcpy( req.name, argv[1]);		req.result = 0;		req.data = &cmd;		req.len = sizeof(cmd);		cmd.startch = atoi( argv[3] );		cmd.endch = atoi( argv[4] );		cmd.timech = atoi( argv[5] );		strtoUINT48( cmd.bssid, argv[6] );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性生活久久| 亚洲国产aⅴ成人精品无吗| 在线电影院国产精品| 99国产精品久久久久| aaa亚洲精品| 欧美日韩中文字幕精品| 欧美精品粉嫩高潮一区二区| 91精品黄色片免费大全| 久久色中文字幕| 亚洲精品中文在线观看| 亚洲国产一区视频| 久久丁香综合五月国产三级网站| 美女在线观看视频一区二区| 国产成人精品一区二区三区四区| 色综合欧美在线视频区| 日韩一级免费观看| 亚洲人成网站精品片在线观看| 亚洲自拍都市欧美小说| 国产黄人亚洲片| 欧美另类videos死尸| 国产精品视频免费看| 秋霞成人午夜伦在线观看| 成人爱爱电影网址| 26uuu久久综合| 激情成人综合网| 欧美一级夜夜爽| 日韩不卡一区二区| 欧美亚洲综合一区| 亚洲国产va精品久久久不卡综合| 国产xxx精品视频大全| 欧美精品一区二区三区视频| 一区二区三区在线免费| 成人动漫中文字幕| 国产精品理论片| 91麻豆国产福利精品| 亚洲欧美在线高清| 97久久精品人人做人人爽| 最新久久zyz资源站| 成人午夜激情在线| 亚洲图片你懂的| 欧美日韩中文精品| 蜜臀av一区二区在线观看| 精品乱人伦小说| 99久久精品免费看国产免费软件| 亚洲免费电影在线| 91麻豆精品久久久久蜜臀| 久久精品国产久精国产| 国产精品亲子伦对白| 欧美亚洲丝袜传媒另类| 捆绑变态av一区二区三区| 国产精品福利在线播放| 欧美一级高清片| 色综合久久精品| 岛国av在线一区| 另类调教123区| 亚洲午夜精品在线| 国产亚洲成年网址在线观看| 欧美日韩国产精品自在自线| 国产精品综合在线视频| 五月激情综合婷婷| 亚洲精品日韩一| 精品处破学生在线二十三| 欧美日韩一区三区四区| 不卡大黄网站免费看| 国产一区日韩二区欧美三区| 午夜精品久久久久久久久久久| 中文字幕第一区二区| 国产欧美日韩视频在线观看| 欧美一级在线视频| 欧美精品一区视频| 久久精品亚洲乱码伦伦中文 | 久久久久久久免费视频了| 在线亚洲免费视频| 欧美三级在线视频| 欧美日韩美女一区二区| 欧美女孩性生活视频| 日韩欧美色综合网站| 久久在线观看免费| 中文字幕欧美三区| 亚洲欧美日韩一区| 美日韩一级片在线观看| 国产一区二区三区观看| 99久久综合色| 欧美老女人在线| 国产农村妇女毛片精品久久麻豆| 日韩一区二区精品| ●精品国产综合乱码久久久久| 日韩一区在线看| 美国十次综合导航| 99国产精品视频免费观看| 在线播放视频一区| 亚洲色图丝袜美腿| 国产一区二区三区在线观看免费视频| 国产综合成人久久大片91| 色悠悠亚洲一区二区| 日韩欧美第一区| 婷婷综合另类小说色区| 色婷婷av一区| 国产精品国产三级国产有无不卡| 日韩专区一卡二卡| 色播五月激情综合网| 中文在线资源观看网站视频免费不卡 | 三级久久三级久久| av亚洲精华国产精华精| 久久精品视频一区二区| 奇米色一区二区| 91麻豆精品91久久久久久清纯| 国产精品久久久久三级| 成人亚洲一区二区一| 精品国产髙清在线看国产毛片| 肉肉av福利一精品导航| 欧美精品自拍偷拍| 狠狠网亚洲精品| 欧美国产日韩在线观看| 成人激情免费网站| 国产精品久久久久天堂| 欧美在线你懂的| 日本欧洲一区二区| 久久精品在线观看| 94-欧美-setu| 天堂va蜜桃一区二区三区漫画版| 日本道色综合久久| 美国十次综合导航| 中文欧美字幕免费| 欧美肥胖老妇做爰| 高清国产一区二区| 亚洲国产精品久久人人爱| 日韩欧美中文字幕一区| 成人综合在线网站| 久久99久久精品欧美| 亚洲特黄一级片| 久久综合九色综合欧美亚洲| av成人动漫在线观看| 日本午夜精品视频在线观看| 欧美xxx久久| 91精品国产高清一区二区三区 | 国产精品美女久久久久久久 | 国产精品女人毛片| 日韩欧美资源站| 欧美精品第一页| 日本韩国欧美在线| 91丝袜高跟美女视频| 国产一区二区视频在线| 免费成人在线视频观看| 亚洲 欧美综合在线网络| 一区二区三区美女| 午夜精品视频在线观看| 亚洲午夜久久久久久久久久久| 亚洲视频一二区| 尤物视频一区二区| 精品卡一卡二卡三卡四在线| 成人免费看视频| 高清成人免费视频| 一本一道综合狠狠老| 色婷婷综合久色| 欧美精品 日韩| 久久综合国产精品| 中文字幕在线不卡国产视频| 亚洲精品一区二区三区精华液| 国产三级一区二区| 国产精品狼人久久影院观看方式| 一区在线播放视频| 日韩电影在线一区二区三区| 国产乱码精品1区2区3区| jizz一区二区| 精品日产卡一卡二卡麻豆| 国产日产精品一区| 蜜臀av在线播放一区二区三区| 激情综合色综合久久| 日本韩国欧美一区二区三区| 日韩欧美一级二级| 亚洲v中文字幕| 91女人视频在线观看| 国产精品国产三级国产aⅴ中文| 日本aⅴ精品一区二区三区| 日韩一区二区免费高清| 日韩午夜在线播放| 日韩丝袜情趣美女图片| 精品91自产拍在线观看一区| 国产欧美一区二区在线| 国产精品麻豆视频| 亚洲日本乱码在线观看| 亚洲资源在线观看| 另类调教123区| jlzzjlzz亚洲日本少妇| 3d成人h动漫网站入口| 欧美精品一区二区蜜臀亚洲| 亚洲国产精品传媒在线观看| 夜夜嗨av一区二区三区中文字幕| 日韩精品久久理论片| 成人午夜精品一区二区三区| a在线播放不卡| 亚洲一区在线观看网站| 色哟哟一区二区| 亚洲同性gay激情无套| 经典一区二区三区| 欧美吻胸吃奶大尺度电影| 中文字幕日本不卡| 2014亚洲片线观看视频免费| 中文字幕一区二区三|