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

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

?? aodv_wlan_mac.pr.c

?? 感知無線電有關(guān)仿真
?? C
?? 第 1 頁 / 共 5 頁
字號:
			    " insufficient buffer capacity. \n"
				"\n"
			    " This may lead to: \n"
  			    " - application data loss.\n"
			    " - higher layer packet retransmission.\n"
			    "\n"
			    " REMDEDIAL ACTION (S): \n"
			    " 1. Reduce Network laod. \n"
			    " 2. User higher speed wireless lan. \n"
			    " 3. Increase buffer capacity\n");
				}
			
			if (pk_size > WLAN_MAXMSDU_LENGTH)
				{
				/* Writing log message for dropped packets due to packet size.	*/
				op_prg_log_entry_write (drop_pkt_log_handle, 
				"SYMPTOMS(S):\n"
			    " Wireless LAN MAC layer discarded some packets due to\n "
			    " large packet size. \n"
				"\n"
			    " This may lead to: \n"
  			    " - application data loss.\n"
			    " - higher layer packet retransmission.\n"
			    "\n"
			    " REMDEDIAL ACTION (S): \n"
			    " 1. Enable fragmentation threshold. \n"
			    " 2. Set the higher layer packet size to \n"
				   " be smaller than max MSDU size \n");
				if(DEBUG) ("SYMPTOMS(S):\n"
			    " Wireless LAN MAC layer discarded some packets due to\n "
			    " large packet size. \n"
				"\n"
			    " This may lead to: \n"
  			    " - application data loss.\n"
			    " - higher layer packet retransmission.\n"
			    "\n"
			    " REMDEDIAL ACTION (S): \n"
			    " 1. Enable fragmentation threshold. \n"
			    " 2. Set the higher layer packet size to \n"
				   " be smaller than max MSDU size \n");
				 }
			drop_pkt_entry_log_flag = OPC_TRUE;
			}

	/* Limit the sum of the sizes of all the packets in the queue to be 	*/
	/* the maximum buffer size.												*/
	if (total_hlpk_size >= hld_max_size)
		{
		total_hlpk_size = hld_max_size;
		}
 
		/* Report stat when data packet is dropped due to overflow buffer.	*/
		op_stat_write (drop_packet_handle, 1.0);
	    op_stat_write (drop_packet_handle, 0.0);

		/* Report stat when data packet is dropped due to overflow buffer.	*/
		op_stat_write (drop_packet_handle_inbits, (double) (pk_size));
	    op_stat_write (drop_packet_handle_inbits, 0.0);
		op_stat_write (global_dropped_data_handle, (double) (pk_size));
		op_stat_write (global_dropped_data_handle, 0.0);
		
		FOUT;   
		}
		
	/* Read ICI parameters at the stream interrupt.	*/
	ici_ptr = op_intrpt_ici ();
	if (DEBUG) printf("--- MAC Msg @ node %d --- receiving ICI.", my_address);
	/* Retrieve destination address from the ici set by the interface layer.	*/
	if (ici_ptr == OPC_NIL || op_ici_attr_get (ici_ptr, "dest_addr", &dest_addr) == OPC_COMPCODE_FAILURE)
		{
		/* Generate error message.	*/
		if (DEBUG) printf("--- MAC Msg @ node %d --- Destination address is not valid.", my_address);
		wlan_mac_error ("Destination address in not valid.", OPC_NIL, OPC_NIL);
		}
	if(DEBUG) printf("  Destination is %d\n", dest_addr);
	/* If it is a broadcast packet or the station doesn't exist in the subnet	*/  
	/*if ((dest_addr < 0) || (oms_aa_address_find (oms_aa_wlan_handle, dest_addr) < 0))*/
	// ############ DEBUG: need broadcasting thus <-1 instead <0
	if (dest_addr < -1)
	   {
	   if(DEBUG) printf("--- MAC Msg @ node %d --- Destination address is < 0 (dest addr = %d.", my_address,dest_addr);
	   /* change the total hld queue size to original value	*/
	   /* as this packet will not be added to the queue.		*/
	   total_hlpk_size = total_hlpk_size - pk_size;
	   op_pk_destroy (hld_pkptr);
	   FOUT;		
	   }
		
	   
	/* Check for an AP bridge that whether the destined stations exist in the BSS or not	*/
	/* if not then no need to broadcast the packet.											*/
	if (wlan_flags->bridge_flag == OPC_BOOLINT_ENABLED && ap_flag == OPC_BOOLINT_ENABLED)
		{
		stn_det_flag = OPC_FALSE;
		for (i = 0; i < bss_stn_count; i++)
			{
			if (dest_addr == bss_stn_list [i])
				{
				if (DEBUG) printf("--- MAC Msg @ node %d --- Destination address was found within BSS list (dest addr = %d.", my_address,dest_addr);
				stn_det_flag = OPC_TRUE;
				}
			}
		
		/* If the destination station doesn't exist in the BSS then */
		/* no need to broadcast the packet.							*/
		if (stn_det_flag == OPC_FALSE)
			{
			if (DEBUG) printf("--- MAC Msg @ node %d --- ERROR: Destination address was NOT found within BSS list (dest addr = %d.", my_address,dest_addr);			
			/* change the total hld queue size to original value	*/
			/* as this packet will not be added to the queue.		*/
			total_hlpk_size = total_hlpk_size - pk_size;
			op_pk_destroy (hld_pkptr);
			FOUT;	
			}
		}

	/* Stamp the packet with the current time. This information will remain		*/
	/* unchanged even if the packet is copied for retransmissions, and			*/
	/* eventually it will be used by the destination MAC to compute the end-to-	*/
	/* end delay.																*/
	op_pk_stamp (hld_pkptr);
	
	/* Insert the arrived packet in higher layer queue.	*/	
	wlan_hlpk_enqueue (hld_pkptr, dest_addr);
	if (DEBUG) printf("--- MAC Msg @ node %d --- packet queued @ Mac Layer\n",my_address);
	FOUT;
	}

static void
wlan_hlpk_enqueue (Packet* hld_pkptr, int dest_addr)
	{
//	int						list_index;
	char					msg_string [120];
	char					msg_string1 [120];
	WlanT_Hld_List_Elem*	hld_ptr;
	double					data_size;
	
	/* Enqueuing data packet for transmission.	*/
	FIN (wlan_hlpk_enqueue (Packet* hld_pkptr, int dest_addr));

	/* Allocating pool memory to the higher layer data structure type. */	
	hld_ptr = (WlanT_Hld_List_Elem *) op_prg_pmo_alloc (hld_pmh);

	/* Generate error message and abort simulation if no memory left for data received from higher layer.	*/
	if (hld_ptr == OPC_NIL)
		{
		wlan_mac_error ("No more memory left to assign for data received from higher layer", OPC_NIL, OPC_NIL);
		}

	/* Updating higher layer data structure fields.	*/
	hld_ptr->time_rcvd           = current_time;
	hld_ptr->destination_address = dest_addr;
	hld_ptr->pkptr               = hld_pkptr;

	/* Insert a packet to the list.*/
	op_prg_list_insert (hld_list_ptr, hld_ptr, OPC_LISTPOS_TAIL);	
	
	/* Enable the flag indicating that there is a data frame to transmit.	*/
	wlan_flags->data_frame_to_send = OPC_BOOLINT_ENABLED;

	/* Printing out information to ODB.	*/
	if (wlan_trace_active == OPC_TRUE)
		{
		sprintf (msg_string, "Just arrived outbound Data packet id %d ", op_pk_id (hld_ptr->pkptr));
		sprintf	(msg_string1, "The outbound Data queue size is %d", 	op_prg_list_size (hld_list_ptr));	
		op_prg_odb_print_major (msg_string, msg_string1, OPC_NIL);
		}

	/* Report stat when outbound data packet is received.	*/
	op_stat_write (packet_load_handle, 1.0);
    op_stat_write (packet_load_handle, 0.0);

	/* Report stat in bits when outbound data packet is received.	*/
	data_size = (double) op_pk_total_size_get (hld_pkptr);
	op_stat_write (bits_load_handle, data_size);
    op_stat_write (bits_load_handle, 0.0);
	
	/* Update the global statistics as well.						*/
	op_stat_write (global_load_handle, data_size);
    op_stat_write (global_load_handle, 0.0);
	
	/* Report outbound data packets queue size at the arrival of every packet.	*/
	op_stat_write (hl_packets_rcvd, (double) (op_prg_list_size (hld_list_ptr)));

	FOUT;
	}

static void 
wlan_frame_transmit ()
	{
	char						msg_string  [120];
	char						msg_string1 [120];
	WlanT_Hld_List_Elem*		hld_ptr;
//	int 						frag_list_size;
//	int							type;
	double						pkt_tx_time;

	/** Main procedure to call functions for preparing frames.   **/
	/** The procedure to prepare frame is called in this routine **/
	FIN (wlan_frame_transmit());

	if(DEBUG) printf("WLAN FRAME Transmit\n");
	/* If Ack and Cts needs to be sent then prepare the appropriate	*/
	/* frame type for transmission									*/
	if ((fresp_to_send == WlanC_Cts) || (fresp_to_send == WlanC_Ack))
		{
		wlan_prepare_frame_to_send (fresp_to_send);

		/* Break the routine if Cts or Ack is already prepared to tranmsit */
		FOUT;
		}
	
	/* If it is a retransmission then check which type of frame needs to be	*/
	/* retransmitted and then prepare and transmit that frame				*/
	else if (retry_count != 0)
		{
		/* If the last frame unsuccessfully transmitted was Rts then transmit it again.	*/
		if ((last_frametx_type == WlanC_Rts) && (wlan_flags->rts_sent == OPC_BOOLINT_DISABLED))
			{
			/* Retransmit the Rts frame.	*/
			wlan_prepare_frame_to_send (WlanC_Rts);
			}

		/* For the retransmission of data frame first check whether Rts needs to be sent or not.	*/
		/* If it Rts needs to be sent and it is not already sent then first transmit Rts and then	*/
		/* transmit data frame.																		*/
		else if (last_frametx_type == WlanC_Data)
			{
			if ((op_pk_total_size_get (wlan_transmit_frame_copy_ptr) > (8 * rts_threshold + WLANC_MSDU_HEADER_SIZE)) && 
				(rts_threshold != -1) && (wlan_flags->rts_sent == OPC_BOOLINT_DISABLED))
				{
				/* Retransmit the Rts frame to again contend for the data .	*/
				wlan_prepare_frame_to_send (WlanC_Rts);				 
				}
			else
				{
				if(DEBUG) printf("wlan prepare frame to send: type DATA\n");
				wlan_prepare_frame_to_send (WlanC_Data);
				}
			}
		else
			{ 
			/* We continue with the retransmission process. We	*/
			/* received the expected Cts for our last Rts.		*/
			/* Hence, now we can retransmit our data frame.		*/
			if(DEBUG) printf("wlan prepare frame to send: type DATA\n");
			wlan_prepare_frame_to_send (WlanC_Data);
			}
			
		FOUT;
		}

	/* If higher layer queue is not empty then dequeue a packet	*/
	/* from the higher layer and insert it into fragmentation 	*/
	/* buffer check whether fragmentation and Rts-Cts exchange 	*/
	/* is needed  based on thresholds							*/
	/* Check if fragmenetation buffer is empty. If it is empty  */
   	/* then dequeue a packet from the higher layer queue.		*/ 
	else if ((op_prg_list_size (hld_list_ptr) != 0) && (op_sar_buf_size (fragmentation_buffer_ptr) == 0))
		{
		/* If rts is already sent then transmit data otherwise	*/
		/* check if rts needs to be sent or not.				*/
		if (wlan_flags->rts_sent == OPC_BOOLINT_DISABLED)
			{
			/* Remove packet from higher layer queue. */
			hld_ptr = (WlanT_Hld_List_Elem*) op_prg_list_remove (hld_list_ptr, 0);
			
			//$$$$$$$$$$$$$$$$$$ DSR $$$$$$$$$$$$$$$$$$$$$$$$
			op_pk_nfd_get((Packet*)(hld_ptr->pkptr),"Type",&data_packet_type);
			if (data_packet_type == DATA_PACKET_TYPE)
				 {
				 op_pk_nfd_get((Packet*)(hld_ptr->pkptr),"NextHop",&data_packet_dest);
			  	 op_pk_nfd_get((Packet*)(hld_ptr->pkptr),"DEST",&data_packet_final_dest);
				 }
			else
				 {
				 data_packet_dest=-1;
				 data_packet_final_dest=-1;
				 }
			//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
			
			/* Update the higher layer queue size statistic.				*/
			op_stat_write (hl_packets_rcvd, (double) (op_prg_list_size (hld_list_ptr)));
			
			/* Determine packet size to determine later wether fragmentation	*/
			/* and/or rts-cts exchange is needed.								*/
			packet_size = op_pk_total_size_get (hld_ptr->pkptr);

			/* Updating the total packet size of the higher layer buffer.	*/
			total_hlpk_size = total_hlpk_size - packet_size;

			/* Setting destination address state variable	*/				
			destination_addr = hld_ptr->destination_address;
						
			/* Packet seq number modulo 4096 counter.	*/
			packet_seq_number = (packet_seq_number + 1) % 4096;  

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人精品视频一区二区三区| 蜜桃精品视频在线观看| 高清免费成人av| 国产日本亚洲高清| 国产精品456| 91国产免费观看| 久久影音资源网| 亚洲日本青草视频在线怡红院| 成人国产电影网| 欧美午夜精品一区二区蜜桃| 中文乱码免费一区二区| 成人免费福利片| 亚洲午夜在线观看视频在线| 欧美精品精品一区| 激情综合亚洲精品| 国产精品久久二区二区| 色婷婷亚洲综合| 青青草97国产精品免费观看| 久久久久99精品一区| caoporm超碰国产精品| 亚洲 欧美综合在线网络| 精品国产一区二区在线观看| 99久久综合99久久综合网站| 亚洲在线观看免费视频| 日韩精品自拍偷拍| 成人综合婷婷国产精品久久蜜臀| 欧美色图天堂网| 蜜桃av一区二区三区| 欧美亚洲图片小说| 韩国女主播成人在线| 亚洲综合小说图片| 久久精品一区四区| 欧美伦理视频网站| 国产91丝袜在线观看| 午夜天堂影视香蕉久久| 亚洲国产高清在线| 欧美一区永久视频免费观看| proumb性欧美在线观看| 日本午夜一本久久久综合| 国产精品色一区二区三区| 欧美精品久久一区| av在线播放不卡| 精品一区二区三区视频在线观看| 亚洲激情自拍视频| 久久精品无码一区二区三区 | 一区二区三国产精华液| 日韩一区二区在线看片| 色综合天天综合狠狠| 国产在线不卡视频| 日韩福利视频导航| 亚洲综合色自拍一区| 欧美国产欧美综合| 精品久久一区二区| 91麻豆精品国产91久久久使用方法| 波多野洁衣一区| 精品在线观看视频| 视频在线在亚洲| 亚洲乱码中文字幕| 国产精品三级av| 国产网站一区二区三区| 日韩一区二区精品葵司在线| 欧美四级电影在线观看| 99久久er热在这里只有精品15 | 国产精品女同互慰在线看| 欧美成人一区二区三区在线观看| 欧美亚男人的天堂| 91麻豆免费在线观看| 成人av电影免费观看| 成人综合婷婷国产精品久久蜜臀 | 亚洲大尺度视频在线观看| 日韩毛片精品高清免费| 国产精品美女视频| 中文字幕一区二区三区在线不卡 | 国产精品无码永久免费888| 精品国产乱码久久久久久老虎| 欧美一级日韩免费不卡| 91精品国产综合久久婷婷香蕉| 色婷婷久久综合| 91福利国产精品| 欧美图区在线视频| 精品视频一区 二区 三区| 欧美在线不卡一区| 欧美日韩一区二区电影| 欧美日韩激情一区二区三区| 欧美精品久久天天躁| 欧美电影免费观看高清完整版 | 中文字幕二三区不卡| 国产欧美日韩在线观看| 日本一区二区电影| 亚洲欧洲精品一区二区三区不卡| 中文字幕一区二区在线播放| 亚洲女爱视频在线| 亚洲国产精品天堂| 日本欧美加勒比视频| 韩国理伦片一区二区三区在线播放| 国产尤物一区二区| 波多野结衣亚洲一区| 日本乱码高清不卡字幕| 欧美蜜桃一区二区三区| 欧美r级电影在线观看| 久久久国产精华| 亚洲激情一二三区| 免费观看一级欧美片| 国产剧情一区二区| 91香蕉视频黄| 欧美精品丝袜久久久中文字幕| 日韩女优av电影在线观看| 国产欧美日韩在线| 亚洲午夜久久久久中文字幕久| 日韩国产一区二| 国产精品123| 欧美性生活一区| 精品国产三级a在线观看| 国产精品污污网站在线观看| 亚洲午夜一区二区| 国产一区在线观看麻豆| 色欧美片视频在线观看在线视频| 欧美精品18+| 欧美激情在线一区二区三区| 亚洲国产成人tv| 高清av一区二区| 欧美日韩精品一区二区在线播放| 久久久久国产精品厨房| 亚洲成av人片| 成人精品小蝌蚪| 日韩视频免费观看高清完整版 | 亚洲一区二区三区免费视频| 久久99精品国产.久久久久| 99精品一区二区| 欧美mv和日韩mv的网站| 亚洲精品久久7777| 国产一区二区三区av电影 | 69堂成人精品免费视频| 国产精品天美传媒| 男女视频一区二区| 一本到不卡免费一区二区| 欧美精品一区二区三区四区 | 日韩视频免费直播| 一区二区三区不卡视频| 成人免费av网站| 亚洲精品一线二线三线无人区| 夜夜嗨av一区二区三区中文字幕| 国产一区 二区| 日韩一卡二卡三卡国产欧美| 一区二区三区欧美日韩| 成人免费的视频| 久久久久国产成人精品亚洲午夜| 天堂va蜜桃一区二区三区| 91在线云播放| 国产精品嫩草99a| 国产乱一区二区| 26uuu精品一区二区三区四区在线| 亚洲午夜成aⅴ人片| 色婷婷激情综合| 亚洲欧美在线aaa| 国产成人亚洲综合a∨猫咪| 日韩一区二区三区电影在线观看| 亚洲国产精品人人做人人爽| 色噜噜久久综合| 亚洲色图视频免费播放| av成人老司机| 中文字幕一区二区三| 成人免费观看视频| 国产精品美女一区二区| caoporm超碰国产精品| 国产精品天干天干在观线| 成人污污视频在线观看| 日本一区二区三区dvd视频在线| 国产伦精一区二区三区| 337p日本欧洲亚洲大胆精品| 精品在线观看免费| 欧美精品一区二| 国产精品一二三四五| 国产精品美女一区二区三区| a亚洲天堂av| 亚洲另类在线一区| 欧美日韩精品一区二区三区四区| 午夜伊人狠狠久久| 在线成人小视频| 秋霞国产午夜精品免费视频| 欧美xxxx在线观看| 国产精品一区二区三区四区| 国产精品午夜电影| 色婷婷av久久久久久久| 午夜精品久久久久| 日韩精品中午字幕| 国模大尺度一区二区三区| 欧美极品美女视频| 在线视频国产一区| 日韩中文字幕麻豆| www国产成人| 成人激情免费网站| 亚洲综合精品自拍| 日韩欧美不卡一区| 国产精品一二三区| 一区二区三区成人| 日韩精品最新网址| 99精品视频在线观看免费| 午夜精品一区二区三区电影天堂 | 成人avav在线|