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

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

?? wlan_support.ex.c

?? aodv的仿真代碼
?? C
字號:
/** wlan_support.ex.c				**//****************************************//*      Copyright (c) 1987 - 1998		*//*            by MIL 3, Inc.           	*//*       (A Delaware Corporation)      	*//*    3400 International Drive, N.W.   	*//*       Washington, D.C., U.S.A.      	*//*       All Rights Reserved.          	*//****************************************//** Include directives.							**/#include <opnet.h>#include <string.h>#include "wlan_support.h"/*  Variables defined for Pooled Memeory allocation.        */static Boolean          pk_dhstruct_pmo_defined = OPC_FALSE; static Pmohandle        wlan_pk_dhstruct_pmh;static Boolean          pk_chstruct_pmo_defined = OPC_FALSE; static Pmohandle        wlan_pk_chstruct_pmh;/* Macro definition for string handling.                            */#define PKPRINT_STRING_INSERT(str, contents, list)                              \	{                                                                           \	str = (char*) op_prg_mem_alloc ((strlen (contents) + 1) * sizeof (char));   \	strcpy (str, contents);                                                     \	op_prg_list_insert (list, str, OPC_LISTPOS_TAIL);                           \	}WlanT_Data_Header_Fields*wlan_mac_pk_dhstruct_create ()    {    WlanT_Data_Header_Fields*          pk_dhstruct_ptr;        /**  Allocate memory for packet field structure and initialize   **/    /**  all components of the data structure. "Pooled" memory is    **/    /**  used to allocate wlan packet fields data structure          **/    /**  allocation block since they are frequently created          **/    /**  and destroyed.                                              **/    FIN (wlan_mac_pk_dhstruct_create ());    /*  If the pooled memory object has not yet been defined, do    */    /*  so now, prior to allocation.                                */    if (pk_dhstruct_pmo_defined == OPC_FALSE)        {        /* Prevent redundant definition.                    */        pk_dhstruct_pmo_defined = OPC_TRUE;        wlan_pk_dhstruct_pmh = op_prg_pmo_define ("wlan packet Data headers fields", sizeof (WlanT_Data_Header_Fields), 1);		/* Initialize the print procedure for the structures.       */		op_pk_format_print_proc_set ("wlan_mac", "Wlan Header", wlan_mac_pk_data_header_pkprint);		        }    pk_dhstruct_ptr = (WlanT_Data_Header_Fields *) op_prg_pmo_alloc (wlan_pk_dhstruct_pmh); 	if (pk_dhstruct_ptr == OPC_NIL)		 {		 op_sim_end ("Error in wlan support code:",					 "Unable to allocate memory for wlan packet fields.",					 OPC_NIL, OPC_NIL);		 } 	 pk_dhstruct_ptr->more_frag = 0; 	 pk_dhstruct_ptr->retry = 0; 	 pk_dhstruct_ptr->order = 0;	 pk_dhstruct_ptr->tods = 0;	 pk_dhstruct_ptr->fromds = 0;	 pk_dhstruct_ptr->duration = 0;			/* Duration for which the channel is contended 					*/	 pk_dhstruct_ptr->address1 = 0; 		/* Destination Address of the final recipient(s) of the frame.	*/	 pk_dhstruct_ptr->address2 = 0; 		/* Source Address from where the frame is originated.			*/	 pk_dhstruct_ptr->address3 = 0; 		/* Receiver Address that identifies the immediated receipient	*/	                                        /* station(s) address.											*/	 pk_dhstruct_ptr->fragment_number = 0;	/* Sequence control field which contains fragment number		*/	 pk_dhstruct_ptr->sequence_number = 0; 	/* Sequence contorl field which contains sequence number		*/	 pk_dhstruct_ptr->address4 = 0; 		/* Transmitter Address of the station that has last transmitted	*/                                        	/* the frame.													*/	     	 FRET (pk_dhstruct_ptr);    }     WlanT_Control_Header_Fields* wlan_mac_pk_chstruct_create ()     {     WlanT_Control_Header_Fields*          pk_chstruct_ptr;          /**  Allocate memory for packet field structure and initialize   **/     /**  all components of the data structure. "Pooled" memory is    **/     /**  used to allocate wlan packet fields data structure          **/     /**  allocation block since they are frequently created          **/     /**  and destroyed.                                              **/     FIN (wlan_mac_pk_chstruct_create ());      /*  If the pooled memory object has not yet been defined, do    */     /*  so now, prior to allocation.                                */     if (pk_chstruct_pmo_defined == OPC_FALSE)         {         /* Prevent redundant definition.                    */         pk_chstruct_pmo_defined = OPC_TRUE;          wlan_pk_chstruct_pmh = op_prg_pmo_define ("wlan packet control header fields", sizeof (WlanT_Control_Header_Fields), 1); 		/* Initialize the print procedure for the structures.       */		op_pk_format_print_proc_set ("wlan_control", "Wlan Header", wlan_mac_pk_control_header_pkprint);		         }      pk_chstruct_ptr = (WlanT_Control_Header_Fields *) op_prg_pmo_alloc (wlan_pk_chstruct_pmh);  	if (pk_chstruct_ptr == OPC_NIL) 		 { 		 op_sim_end ("Error in wlan support code:", 					 "Unable to allocate memory for wlan packet fields.", 					 OPC_NIL, OPC_NIL); 		 }      /*  Initialize all fields of the packet fields data structure   */ 	 pk_chstruct_ptr->more_frag = 0; 	 pk_chstruct_ptr->retry = 0; 	 pk_chstruct_ptr->order = 0;	 pk_chstruct_ptr->tods = 0;	 pk_chstruct_ptr->fromds = 0;	 pk_chstruct_ptr->duration = 0;		/* Duration for which the channel is contended 					*/	 pk_chstruct_ptr->rx_addr = 0; 		/* Destination Address of the final recipient(s) of the frame.	*/	 pk_chstruct_ptr->tx_addr = 0; 		/* Source Address from where the frame is originated.			*/	     FRET (pk_chstruct_ptr);     }     WlanT_Data_Header_Fields*wlan_mac_pk_dhstruct_copy (WlanT_Data_Header_Fields* pk_dh_ptr)    {    WlanT_Data_Header_Fields*  copy_pk_dh_ptr;     /**  Copy the packet field structure.    **/    FIN (wlan_mac_pk_dhstruct_copy (pk_dh_ptr));     /*  Allocate memeory for packet field structure and */    /*  copy it.                                        */    copy_pk_dh_ptr = (WlanT_Data_Header_Fields *) op_prg_pmo_alloc (wlan_pk_dhstruct_pmh); 	if (copy_pk_dh_ptr == OPC_NIL)		 {		 op_sim_end ("Error in wlan support code:",					 "Unable to allocate memory for copying wlan packet fields.",					 OPC_NIL, OPC_NIL);		 } 	/* Copy frame control fields*/    op_prg_mem_copy (pk_dh_ptr, copy_pk_dh_ptr, sizeof(WlanT_Data_Header_Fields));     FRET (copy_pk_dh_ptr);    }  WlanT_Control_Header_Fields* wlan_mac_pk_chstruct_copy (WlanT_Control_Header_Fields* pk_ch_ptr)     {     WlanT_Control_Header_Fields*  copy_pk_ch_ptr;       /**  Copy the packet field structure.    **/     FIN (wlan_mac_pk_chstruct_copy (pk_ch_ptr));       /*  Allocate memeory for packet field structure and */     /*  copy it.                                        */     copy_pk_ch_ptr = (WlanT_Control_Header_Fields *) op_prg_pmo_alloc (wlan_pk_chstruct_pmh);  	if (copy_pk_ch_ptr == OPC_NIL) 		 { 		 op_sim_end ("Error in wlan support code:", 					 "Unable to allocate memory for copying wlan packet fields.", 					 OPC_NIL, OPC_NIL); 		 } 	/* Copy sequence control fields				*/     op_prg_mem_copy (pk_ch_ptr, copy_pk_ch_ptr, sizeof(WlanT_Control_Header_Fields));       FRET (copy_pk_ch_ptr);     }   voidwlan_mac_pk_dhstruct_destroy (WlanT_Data_Header_Fields* pk_dhstruct_ptr)    {    /**  Deallocate the packet structure memory.     **/    FIN (wlan_mac_pk_dhstruct_destroy (pk_dhstruct_ptr));     	/* Destroy frame control field structure         */    op_prg_mem_free (pk_dhstruct_ptr);        FOUT;    }  void wlan_mac_pk_chstruct_destroy (WlanT_Control_Header_Fields* pk_chstruct_ptr)     {     /*  Deallocate the packet structure memory.     */     FIN (wlan_mac_pk_chstruct_destroy (pk_chstruct_ptr)); 	 	/* Destroy frame control field structure         */         op_prg_mem_free (pk_chstruct_ptr);          FOUT;     } voidwlan_mac_pk_data_header_pkprint (void* structure_ptr, PrgT_List* output_list)	{	char		temp_str[128];	char*		alloc_str;	WlanT_Data_Header_Fields* pk_dh_ptr;	/** Called as part of a packet print, this procedure will	**/	/** place the contents of the "fields" structure into a		**/	/** printed list.											**/	FIN (wlan_mac_pk_data_header_pkprint (structure_ptr, output_list));    pk_dh_ptr = (WlanT_Data_Header_Fields *) structure_ptr;	sprintf(temp_str, "      more_frag           int         %-16d(1)", pk_dh_ptr->more_frag);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      retry               int         %-16d(1)", pk_dh_ptr->retry);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      order               int         %-16d(1)", pk_dh_ptr->order);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      tods               int         %-16d(1)", pk_dh_ptr->tods);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      fromds               int         %-16d(1)", pk_dh_ptr->fromds);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      duration            double         %-16.6f(16)", pk_dh_ptr->duration);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      address1            int         %-16d(48)", pk_dh_ptr->address1);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      address2            int       %-16d(48)", pk_dh_ptr->address2);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      address3            int       %-16d(48)", pk_dh_ptr->address3);		PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      fragment_number     int       %-16d(32)", pk_dh_ptr->fragment_number);		PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      sequence_number     int       %-16d(96)", pk_dh_ptr->sequence_number);		PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      address4            int       %-16d(48)", pk_dh_ptr->address4);		PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)					FOUT;	}voidwlan_mac_pk_control_header_pkprint (void* structure_ptr, PrgT_List* output_list)	{	char		temp_str[128];	char*		alloc_str;	WlanT_Control_Header_Fields* pk_ch_ptr;	/** Called as part of a packet print, this procedure will	**/	/** place the contents of the "fields" structure into a		**/	/** printed list.											**/	FIN (wlan_mac_pk_control_header_pkprint (structure_ptr, output_list));	pk_ch_ptr = (WlanT_Control_Header_Fields* ) structure_ptr;	sprintf(temp_str, "      more_frag           int         %-16d(1)", pk_ch_ptr->more_frag);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      retry               int         %-16d(1)", pk_ch_ptr->retry);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      order               int         %-16d(1)", pk_ch_ptr->order);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      duration            double         %-16.6f(16)", pk_ch_ptr->duration);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "     rx_addr              int         %-16d(48)", pk_ch_ptr->rx_addr);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)	sprintf(temp_str, "      tx_addr             int       %-16d(48)", pk_ch_ptr->tx_addr);	PKPRINT_STRING_INSERT (alloc_str, temp_str, output_list)			FOUT;	}void aodv_wlan_pk_print(Packet* wlan_rcvd_frame_ptr){	WlanT_Data_Header_Fields*					pk_dhstruct_ptr;	WlanT_Control_Header_Fields*				pk_chstruct_ptr;	WlanT_Mac_Frame_Type						rcvd_frame_type;		// Begin	op_pk_nfd_access (wlan_rcvd_frame_ptr, "Type", &rcvd_frame_type) ;	printf("\t\t|------------------------------------|\n");	/* Divide processing based on frame type	*/			switch (rcvd_frame_type)		{				case WlanC_Data:			{			printf("\t\t|                Data                |\n");			printf("\t\t|------------------------------------|\n");			/* Address information, sequence control fields,	*/			/* and the data is extracted from the rcvd packet.	*/			op_pk_nfd_access (wlan_rcvd_frame_ptr, "Wlan Header",	&pk_dhstruct_ptr);			printf( "\t\t|  Destination: %d\n", pk_dhstruct_ptr->address1);			printf( "\t\t|  source     : %d\n", pk_dhstruct_ptr->address2);			printf( "\t\t|  Address3   : %d\n", pk_dhstruct_ptr->address3);			printf("\t\t|------------------------------------|\n");			break;			}		case WlanC_Rts:			{			printf("\t\t|                RTS                 |\n");			printf("\t\t|------------------------------------|\n");			/* Address information, sequence control fields,	*/			/* and the data is extracted from the rcvd packet.	*/			op_pk_nfd_access (wlan_rcvd_frame_ptr, "Wlan Header",	&pk_chstruct_ptr);			printf( "\t\t|  RX Address: %d\n", pk_chstruct_ptr->rx_addr);			printf( "\t\t|  TX Address: %d\n", pk_chstruct_ptr->tx_addr);			printf("\t\t|------------------------------------|\n");			break;			}		case WlanC_Cts:			{			printf("\t\t|                CTS                 |\n");			printf("\t\t|------------------------------------|\n");			/* Address information, sequence control fields,	*/			/* and the data is extracted from the rcvd packet.	*/			op_pk_nfd_access (wlan_rcvd_frame_ptr, "Wlan Header",	&pk_chstruct_ptr);			printf( "\t\t|  RX Address: %d\n", pk_chstruct_ptr->rx_addr);			printf( "\t\t|  TX Address: %d\n", pk_chstruct_ptr->tx_addr);			printf("\t\t|------------------------------------|\n");			break;			}		case WlanC_Ack:			{			printf("\t\t|                ACK                 |\n");			printf("\t\t|------------------------------------|\n");			/* Address information, sequence control fields,	*/			/* and the data is extracted from the rcvd packet.	*/			op_pk_nfd_access (wlan_rcvd_frame_ptr, "Wlan Header",	&pk_chstruct_ptr);			printf( "\t\t|  RX Address: %d\n", pk_chstruct_ptr->rx_addr);			printf( "\t\t|  TX Address: %d\n", pk_chstruct_ptr->tx_addr);			printf("\t\t|------------------------------------|\n");			break;			}		}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清久久久| 中文字幕亚洲区| 蜜桃av一区二区三区电影| 欧美综合一区二区| 亚洲国产一区视频| 欧美精选午夜久久久乱码6080| 色狠狠色狠狠综合| 欧美一区二区精品久久911| 亚洲国产成人porn| 日韩精品在线看片z| 国产精品小仙女| 亚洲欧美日本在线| 欧美三级韩国三级日本三斤| 肉色丝袜一区二区| 久久亚区不卡日本| 不卡高清视频专区| 亚洲国产一区在线观看| 日韩美女视频一区二区在线观看| 国产一本一道久久香蕉| 中文字幕在线不卡国产视频| 在线观看日韩电影| 美女视频一区在线观看| 国产亚洲一区字幕| 色综合天天综合网天天狠天天| 亚州成人在线电影| 久久香蕉国产线看观看99| 97久久精品人人做人人爽50路| 亚洲线精品一区二区三区| 久久婷婷成人综合色| 色婷婷精品久久二区二区蜜臂av| 日韩黄色免费电影| 国产精品久久久久一区二区三区 | 中文字幕一区二区三| 色婷婷av一区| 久久精品免费观看| 亚洲图片激情小说| 欧美成人精品1314www| 成人高清视频在线观看| 日韩制服丝袜av| 国产精品久久久久久亚洲毛片 | 首页国产欧美久久| 欧美高清一级片在线观看| 91 com成人网| 91在线观看高清| 九九在线精品视频| 91色九色蝌蚪| 久久精品av麻豆的观看方式| 亚洲精品成人天堂一二三| 精品久久久网站| 欧美剧情片在线观看| 91麻豆精品在线观看| 国产精品1区2区3区在线观看| 亚洲r级在线视频| 中文字幕在线观看不卡视频| 精品国产一区二区在线观看| 欧美日韩成人综合天天影院| 成人av小说网| 国产精品影视网| 精品亚洲porn| 青草av.久久免费一区| 亚洲成人动漫一区| 欧美激情中文字幕一区二区| 日韩你懂的电影在线观看| 欧美日韩亚洲综合一区二区三区| www.av精品| 粉嫩aⅴ一区二区三区四区| 国产制服丝袜一区| 经典三级一区二区| 玖玖九九国产精品| 日本在线不卡视频| 天天色图综合网| 亚洲成在线观看| 亚洲图片有声小说| 亚洲午夜精品久久久久久久久| 亚洲欧美日韩久久| 亚洲欧美日韩一区| 亚洲精品欧美综合四区| 亚洲人成精品久久久久久| 亚洲日本在线看| 亚洲免费在线电影| 亚洲激情一二三区| 亚洲制服欧美中文字幕中文字幕| 亚洲男人电影天堂| 亚洲高清不卡在线| 婷婷综合在线观看| 日本va欧美va欧美va精品| 美女在线视频一区| 国产中文一区二区三区| 高清日韩电视剧大全免费| 成人午夜电影网站| 91激情五月电影| 欧美丝袜自拍制服另类| 91精品婷婷国产综合久久性色| 欧美一二三四区在线| 精品少妇一区二区三区在线视频| 久久婷婷色综合| 最近中文字幕一区二区三区| 亚洲国产精品视频| 欧美aaa在线| 日本va欧美va欧美va精品| 亚洲第一av色| 美国十次综合导航| 日本亚洲最大的色成网站www| 视频一区中文字幕国产| 久久久久9999亚洲精品| 日韩欧美高清一区| 国产人成一区二区三区影院| 亚洲欧美综合色| 石原莉奈在线亚洲三区| 国产在线精品免费| 91亚洲精华国产精华精华液| 欧美精品日韩综合在线| 久久女同性恋中文字幕| 亚洲另类春色国产| 免费看精品久久片| 不卡av免费在线观看| 欧美日韩免费观看一区二区三区| 欧美va亚洲va香蕉在线| 亚洲精品乱码久久久久久黑人 | 中文字幕亚洲综合久久菠萝蜜| 亚洲动漫第一页| 国产丶欧美丶日本不卡视频| 欧美日韩中文国产| 国产拍欧美日韩视频二区| 亚洲444eee在线观看| 国产精品123区| 777亚洲妇女| 中文字幕一区二区三区四区| 免费看日韩精品| 一本大道久久a久久精品综合| 精品国产乱码久久久久久免费| 综合久久给合久久狠狠狠97色| 麻豆国产精品777777在线| 色综合久久综合网97色综合| 精品国产免费视频| 亚洲成人在线免费| 成人久久视频在线观看| 欧美成人高清电影在线| 亚洲电影一级片| jvid福利写真一区二区三区| 欧美变态口味重另类| 亚洲成人福利片| 色94色欧美sute亚洲线路二 | 1区2区3区精品视频| 久久99精品久久久久婷婷| 色av综合在线| 国产精品久久毛片a| 国产精品综合av一区二区国产馆| 欧美精品一卡两卡| 亚洲一区二区在线观看视频| 成人黄色国产精品网站大全在线免费观看| 91精品国产综合久久小美女| 亚洲精品视频免费看| 成人激情小说乱人伦| 精品国产一区二区三区不卡| 日韩精品色哟哟| 欧美在线短视频| 一区二区三区四区不卡在线 | 一区二区不卡在线视频 午夜欧美不卡在 | 1024成人网| 成人丝袜高跟foot| 国产亚洲综合色| 丁香啪啪综合成人亚洲小说| 久久久99久久精品欧美| 国产一区二区福利视频| 久久伊99综合婷婷久久伊| 国内欧美视频一区二区| 精品国产免费人成电影在线观看四季| 天天av天天翘天天综合网色鬼国产| 成人精品视频.| 亚洲欧美另类久久久精品| 色哟哟亚洲精品| 亚洲久本草在线中文字幕| 一本久久a久久精品亚洲| 亚洲精品中文字幕在线观看| 91免费观看视频在线| 一区二区三区波多野结衣在线观看| 色婷婷亚洲综合| 一区二区欧美在线观看| 91精品视频网| 国产精品一级二级三级| 国产精品伦一区| 欧美中文一区二区三区| 丝袜美腿亚洲一区二区图片| 精品久久久久av影院| 国产精品综合视频| 亚洲欧洲精品一区二区精品久久久| 91日韩在线专区| 视频一区免费在线观看| 久久久亚洲午夜电影| jizzjizzjizz欧美| 一区二区在线观看视频| 91精品国产综合久久久久久漫画| 久草这里只有精品视频| 国产精品久99| 91精选在线观看| 国产高清在线精品| 亚洲精品视频免费观看| 精品国产一区二区三区忘忧草| 不卡的av中国片|