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

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

?? mac-802_16-ss.cc

?? Its the source code for implementing WIMAX in NS-2
?? CC
?? 第 1 頁 / 共 5 頁
字號:
/****************************************************************************** * WiMAX module * * Copyright (C) 2008 Juliana Freitag Borin, Flavio Kubota and Nelson L. * S. da Fonseca - wimaxgroup@lrc.ic.unicamp.br * * This program is a free result: you can redistribute it and/or modify * it under the terms of the UOL Public License Version 1 or (at your * option) any later version. The license terms are available at * http://bolsapesquisa.uol.com.br/lpu.jhtm. * * This file contains the SS object class method implementations  * * Revisions: *   $A0:  4/2/03:   changed total_num_sent_bytes and  *                   total_num_rx_bytes to doubles. *                   (changed all printf formats) *   $A1: 6/23/2003: Needed to fprintf the app bytes counts as a  *                   double instead of an integer *   $A2: 7/16/04:   Stat counters for #ACKs and #ACKs filtered *   $A3: 9/4/04:    Need to have the SS send a rng-req randomly  *                   (before fixed time- caused lots collisions) *   $A4  9/28/04 :  Changed ch->ptype_ from PT_MAC to a PT_802_16xxx *   $A5  2/17/2005  upstream rate control (Viraj) *   $A6  3/5/05:    changed meaning/use of max-concat-thresh param *                   It now represents the max number of packets *                   that can be inserted in a concat frame. A *                   value of 1 is the same as turning off concat. *   $A7 3/8/05:    in SendReq, the slots is a u_char but it temporarily *                  might need to be > 255.  Changed to u int and made sure *                  to set mac_param to uchar *   $A8 3/9/05:    Added packetTrace capability (just like in BS) *                  Note:  currently won't trace fragments-  *                  To see changes, search for PACKET_TRACE *   $A9 3/11/05:   TODO:  We currently might send a piggybacked concat request- *                   I am checking to see if this is allowed. *   $A10 3/11/05:  NOW define the CONCAT_THRESHOLD parameter as the max *     number of packets allowed to be carried in a concatonated frame. *     If this param is 0 or 1, it disables concatonation. *   $A11  03/23/05:  We were deleting the MAP packet too early. *   $A12: 03/26/05: Fixed jitter calculation *   $A13: 03/27/05: Bug with default upstream index *   $A14: 04/30/05: Added TIMINGS.dat trace.  See the method below *          timingsTrace() for  documentation. *          SEarch for TIMINGS to see all code that was changed in this file. *   $A15: 03/15/06: (J. Freitag) included non-real-time service       *   $A16: 03/31/06: (J. Freitag) included downlink QoS services   *   $A17: 08/30/06: (J. Freitag) QoS parameters (latency and minimum bandwidth) for scheduling services  *   $A18: 09/19/06: (J. Freitag) included incremental bandwidth request *   $A19: 10/12/06: (J. Freitag) changed the code to permit rtPS and nrtPS to send concatenated packets *   $A20: 10/19/06: (J. Freitag) before sending concatenated packets it must be checked how many slots *                                were allocated for the current grant. In the previus implementation the  *                                SS would send as many packets as it requested bw for in the previous SendReq. *   $A21: 11/22/06: (J. Freitag) replaced u_char mac_param; by u_int16_t mac_param; in 802_16_frame_hdr  *                                in order to permit bw requests greater than 255 slots	 *   $A22: 04/27/07: (J. Freitag) included extended-real-time service *   $A23: 05/07/07: (J. Freitag) changed bandwidht requests so that they are made in terms of the number of  *                                bytes, instead of the number of slots.  *   $A24: 06/12/07: (J. Freitag) excluded function set-default() and simplified the way we set the default  *                                upstream connection  *   $A25: 07/10/07: (J. Freitag) included periodic aggregate bandwidth request  *   $A26: 08/13/07: (J. Freitag) excluded the DataGrantPending, since in the 802.16 standard *                   the SSs has no knowledge about the pending grants in the BS queues.  *****************************************************************************//*! \file mac-802_16-ss.cc  This file contains the SS object class method implementations */ #include "mac-802_16.h"#include "random.h"#include <stdio.h>#include "ping.h"/*===============================MACROS=========================*///$A5#define US_RATE_CONTROL 1//Turns on timing logs//#define TIMINGS 1//Note: this will trace MAC message data, but no framing layer  overhead//#define TRACE_SS_UP_DATA 0//#define TRACE_SS_DOWN_DATA 0//To turn on packet tracing//#define PACKET_TRACE 1//Define this to 1 so the final stats are 1 line rather than4 lines of text...#define SHORT_STATS 1extern int lan_num;extern Mac802_16BS* bs_arr[NUM_802_16_LANS];#define SET_RX_STATE(x)                 \{                                       \        rx_state_ = (x);                        \}#define SET_TX_STATE(x)                         \{                                               \        tx_state_ = (x);                                \}/*===============================END MACROS=============================*//*************************************************************************   TCL Hooks for the simulator*************************************************************************//*! TCL Hooks for the simulator */static class Mac802_16SSClass : public TclClass {public:  Mac802_16SSClass() : TclClass("Mac/802_16SS") {}  TclObject* create(int, const char*const*)   {    return (new Mac802_16SS);  }} class_mac_802_16ss;/*************************************************************************CONSTRUCTOR FUNCTION*************************************************************************//*! Constructor Function */Mac802_16SS::Mac802_16SS()    : Mac802_16(), mhSSRng_(this), mhSSSend_(this), mhReq_(this){  /*      Will not be having service-flow information here...So, using      command function to set the service-flow parameters...  */    collision = 0;  SizeUpFlowTable = 0;  SizeDownFlowTable = 0;  default_upstream_index_ = 0;  default_dstream_index_ = 0;  map_acktime = -1.0;  debug_ss = 0;  priority = 0;  SndList = 0;  ReqList = 0;  last_dmptime = 0;  rng_ = new RNG;  rng_->set_seed(RNG::HEURISTIC_SEED_SOURCE);    UGSswitch[0] = &Mac802_16SS::ugs_idle;  UGSswitch[1] = &Mac802_16SS::ugs_decision;  UGSswitch[2] = &Mac802_16SS::ugs_tosend;  UGSswitch[3] = &Mac802_16SS::ugs_waitformap;    RTPOLLswitch[0] = &Mac802_16SS::rtpoll_idle;  RTPOLLswitch[1] = &Mac802_16SS::rtpoll_decision;  RTPOLLswitch[2] = &Mac802_16SS::rtpoll_tosend;  RTPOLLswitch[3] = &Mac802_16SS::rtpoll_waitformap;  RTPOLLswitch[4] = &Mac802_16SS::rtpoll_tosendreq;  //$A26 RTPOLLswitch[5] = &Mac802_16SS::rtpoll_reqsent;  //$A22  ERTPOLLswitch[0] = &Mac802_16SS::ertpoll_idle;  ERTPOLLswitch[1] = &Mac802_16SS::ertpoll_decision;  ERTPOLLswitch[2] = &Mac802_16SS::ertpoll_tosend;  ERTPOLLswitch[3] = &Mac802_16SS::ertpoll_waitformap;  ERTPOLLswitch[4] = &Mac802_16SS::ertpoll_tosendreq;    //$A15  NRTPOLLswitch[0] = &Mac802_16SS::nrtpoll_idle;  NRTPOLLswitch[1] = &Mac802_16SS::nrtpoll_decision;  NRTPOLLswitch[2] = &Mac802_16SS::nrtpoll_tosend;  NRTPOLLswitch[3] = &Mac802_16SS::nrtpoll_waitformap;  NRTPOLLswitch[4] = &Mac802_16SS::nrtpoll_tosendreq;  NRTPOLLswitch[5] = &Mac802_16SS::nrtpoll_reqsent;  NRTPOLLswitch[6] = &Mac802_16SS::nrtpoll_contention;  BEFFORTswitch[0] = &Mac802_16SS::beffort_idle;  BEFFORTswitch[1] = &Mac802_16SS::beffort_decision;  BEFFORTswitch[2] = &Mac802_16SS::beffort_tosend;  BEFFORTswitch[3] = &Mac802_16SS::beffort_waitformap;  BEFFORTswitch[4] = &Mac802_16SS::beffort_tosendreq;  BEFFORTswitch[5] = &Mac802_16SS::beffort_reqsent;  BEFFORTswitch[6] = &Mac802_16SS::beffort_contention;  //$A5  //BEFFORTswitch[7] = &Mac802_16SS::beffort_ratecheck;  //    //STATISTICS  num_pkts = 0;  num_bytes = 0;  total_num_sent_pkts =0;   /* total Num of packets sent */  total_num_sent_bytes =0;  /* total Num of bytes received  */  total_num_rx_pkts =0;     /* total Num of packets received  */  total_num_rx_bytes =0;    /* total Num of bytes received */  total_num_BW_bytesDOWN =0;  total_num_BW_bytesUP =0;  total_num_appbytesUS = 0; /* Total num of upper-layer data 			       transmitted on US at SS*/  total_num_appbytesDS = 0; /* Total num of upper-layer data 			       received on DS at SS*/  total_num_frag = 0;  total_num_collisions = 0;  last_BWCalcTime = Scheduler::instance().clock();  total_packets_dropped =0;  /* total Num of packets dropped */  total_collision_drops = 0; /* Total num of packets dropped due to 				transmission attempt exceeding 16 */  total_queue_drops = 0;     /* Total num of packets dropped due to 				service-flow queue overflow */    my_lan = lan_num - 1;      #ifdef TCP_DELAY_BIND_ALL //--------------------------------------------------#else //----------------------------------------------------------------------  bind("total_SS_bytes_sent", &total_num_sent_bytes);  //bind("total_SS_pkts_sent", &total_num_sent_bytes);#endif//----------------------------------------------------------------------}/**************************************************************************************************************************************************/int Mac802_16SS::command(int argc, const char*const* argv){  char f = 0;  char k;  //printf("\nmac-802_16ss:command: entered argc this many: %d,  last arg is :%s",argc,argv[1]);  if (argc == 21)     {       //SizeUpFlowTable on entry is 0 and on exit will be the number of flows for this SS      if (strcmp(argv[1], "insert-upflow") == 0) 	{	  Initialize_entry(0, SizeUpFlowTable);	  UpFlowTable[SizeUpFlowTable].upstream_record.sched_type = (SchedType)atoi(argv[2]);	  	  UpFlowTable[SizeUpFlowTable].upstream_record.classifier.src_ip = atoi(argv[3]); 	  UpFlowTable[SizeUpFlowTable].upstream_record.classifier.dst_ip = atoi( argv[4]); 	  UpFlowTable[SizeUpFlowTable].upstream_record.classifier.pkt_type = (packet_t) atoi(argv[5]); 	  UpFlowTable[SizeUpFlowTable].upstream_record.PHS_profile = (PhsType) atoi(argv[6]); //  printf("\nmac-802_16ss:command: flow sched_type:%d, src_ip:%d, dst_ip:%d, pkt_type:%d",//	  UpFlowTable[SizeUpFlowTable].upstream_record.sched_type,//	  UpFlowTable[SizeUpFlowTable].upstream_record.classifier.src_ip,//	  UpFlowTable[SizeUpFlowTable].upstream_record.classifier.dst_ip,//	  UpFlowTable[SizeUpFlowTable].upstream_record.classifier.pkt_type);	  f = atoi(argv[7]);	  	  if (f)	    set_bit(&UpFlowTable[SizeUpFlowTable].upstream_record.flag, FRAG_ENABLE_BIT,ON);	  	  f = atoi(argv[8]);	  	  if (f)	    set_bit(&UpFlowTable[SizeUpFlowTable].upstream_record.flag, CONCAT_ENABLE_BIT,ON);	  	  //$A10	  UpFlowTable[SizeUpFlowTable].max_concat_threshhold = ((u_int16_t) atoi(argv[9])-1);	  //If CONCAT_THRESHOLD-1 is <= 0, just turn off CONCATONATION.	  if (bit_on(UpFlowTable[SizeUpFlowTable].upstream_record.flag,CONCAT_ENABLE_BIT) && 	      (UpFlowTable[SizeUpFlowTable].max_concat_threshhold <= 0))	    {//$A10	      set_bit(&UpFlowTable[SizeUpFlowTable].upstream_record.flag, CONCAT_ENABLE_BIT,OFF);//	      printf(" WARNING: TURNING OFF CONCATONATION since  max_concat_threshhold =%d\n",//	             UpFlowTable[SizeUpFlowTable].max_concat_threshhold);	      //	      printf("Incorrect value for max_concat_threshhold specified, exiting\n");//	      exit(1);	    }	  	  f = atoi(argv[10]);	  	  if (f)	    set_bit(&UpFlowTable[SizeUpFlowTable].upstream_record.flag, PIGGY_ENABLE_BIT,ON);	  	  UpFlowTable[SizeUpFlowTable].upstream_record.gsize = (u_int16_t) atoi(argv[11]); 	  UpFlowTable[SizeUpFlowTable].upstream_record.ginterval = (double) atof(argv[12]);          //$A17	  UpFlowTable[SizeUpFlowTable].upstream_record.latency = (double) atof(argv[13]); 	  UpFlowTable[SizeUpFlowTable].upstream_record.min_bw = (u_int32_t) atoi(argv[14]); 	  UpFlowTable[SizeUpFlowTable].upstream_record.min_bw /= 8;	  //$A25	  UpFlowTable[SizeUpFlowTable].aggreqinterval = (u_int16_t) atoi(argv[15]);//$A13//	  if (f)//	    {//	      set_default(SizeUpFlowTable);//	    }	  //$A24          //set_default();	  f = atoi(argv[16]);	  if (f) {	    if (debug_ss)	      printf("Mac802_16SS:set_default: Find default upstream flow: SizeUpFlowTable:%d\n",SizeUpFlowTable);	    default_upstream_index_ = SizeUpFlowTable;	  }	  UpFlowTable[SizeUpFlowTable].packet_list = 0;	  UpFlowTable[SizeUpFlowTable].max_qsize = atoi(argv[17]);	  UpFlowTable[SizeUpFlowTable].debug = atoi(argv[18]);	  	  //$A5	  UpFlowTable[SizeUpFlowTable].ratecontrol = (char)(atoi(argv[19]));	  UpFlowTable[SizeUpFlowTable].rate_ = (double) atof(argv[20]);	  UpFlowTable[SizeUpFlowTable].state = 0;	  UpFlowTable[SizeUpFlowTable].not_requested_pkts = 0;	  UpFlowTable[SizeUpFlowTable].req_counter = 0;//Make sure this is at the end	  SizeUpFlowTable++;	  return TCL_OK;	}    }  else if (argc == 2)    {      if (strcmp(argv[1],"start") == 0) 	{	  if (debug_ss)	    printf("SS%d :Starting\n",ss_id);	  	  bs_addr = bs_arr[my_lan]->register_to_bs(index_, 							 priority,							 default_upstream_index_,							 default_dstream_index_,							 UpFlowTable, 							 SizeUpFlowTable, 							 DownFlowTable, 							 SizeDownFlowTable);	  if (debug_ss)	    {	      printf("SS%d :Flows\n",ss_id);	      print_classifiers();	    }	  	  /* Start the timer to send Ranging requests...*/	  /* $A3 :  add some randomness.  This will reduce the frequency but that's ok */	  double random_delay  = Random::uniform(.01,3);	  mhSSRng_.start((Packet *) (&rintr), (rng_freq+random_delay));		  	  return TCL_OK;	}    }  else if (argc == 3)     {      if (strcmp(argv[1],"BS") == 0) 	{	  return TCL_OK;	}      else if (strcmp(argv[1],"dump-BW-ss") == 0) 	{	  (void)dumpBWSS((char *)argv[2]);	  return TCL_OK;	}      else if (strcmp(argv[1],"dump-final-ss-stats") == 0) 	{	  (void)dumpFinalSSStats((char *)argv[2]);	  return TCL_OK;	}      else if (strcmp(argv[1],"dump-jitter-ss") == 0) 	{	  return TCL_OK;	}      /*Modification included by Juliana Freitag      else if(strcmp(argv[1], "nodes") == 0)         {	  if(cache_) return TCL_ERROR;	  cache_node_count_ = atoi(argv[2]);	  cache_ = new Host[cache_node_count_ + 1];	  assert(cache_);	  bzero(cache_, sizeof(Host) * (cache_node_count_+1 ));	  return TCL_OK;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91小视频在线| 蜜臀av一区二区在线观看| 国产在线精品免费av| 欧美一区二区三区播放老司机| 亚洲宅男天堂在线观看无病毒| 在线视频欧美区| 亚洲成精国产精品女| 91精品国产综合久久蜜臀| 免费看欧美美女黄的网站| 日韩一级片网站| 国产黄色精品网站| 中文字幕免费不卡| 色婷婷亚洲一区二区三区| 亚洲国产精品自拍| 日韩免费视频一区| 国产99久久久国产精品免费看 | 偷窥少妇高潮呻吟av久久免费| 欧美亚洲国产一区二区三区va| 午夜精品福利久久久| 精品乱码亚洲一区二区不卡| 成人精品亚洲人成在线| 亚洲视频一区二区在线| 69堂成人精品免费视频| 韩国中文字幕2020精品| 亚洲欧洲精品一区二区精品久久久| 在线观看免费成人| 美女视频网站黄色亚洲| 中文无字幕一区二区三区| 色婷婷综合视频在线观看| 麻豆极品一区二区三区| 国产精品理论片| 宅男噜噜噜66一区二区66| 国产高清在线观看免费不卡| 亚洲在线观看免费视频| 精品99久久久久久| 在线中文字幕一区二区| 久久99国内精品| 一区二区三区**美女毛片| 精品国产麻豆免费人成网站| 在线欧美日韩国产| 国产又黄又大久久| 日韩vs国产vs欧美| 91成人国产精品| 国产精品一区二区在线观看不卡| 国产精品视频看| 91精品久久久久久久99蜜桃| 成人免费毛片aaaaa**| 日本不卡中文字幕| 亚洲人成网站精品片在线观看| 精品成人在线观看| 欧美三级在线视频| 成人aa视频在线观看| 韩国毛片一区二区三区| 亚洲成人黄色影院| 亚洲欧美怡红院| 国产午夜精品福利| 日韩欧美电影一区| 91福利国产成人精品照片| 大陆成人av片| 国产乱子轮精品视频| 免费不卡在线视频| 亚洲一二三级电影| 亚洲欧美色图小说| 国产欧美日韩另类一区| 精品久久人人做人人爰| 777久久久精品| 欧美性做爰猛烈叫床潮| 99精品1区2区| 成人一区二区三区在线观看| 国产一区二区三区久久悠悠色av| 久久精品国产亚洲a| 视频一区视频二区在线观看| 一区二区三区四区不卡视频| 亚洲婷婷综合色高清在线| 中文字幕成人在线观看| 久久夜色精品国产欧美乱极品| 日韩欧美一级在线播放| 91精品国产色综合久久不卡蜜臀| 欧美狂野另类xxxxoooo| 欧美日韩国产一区二区三区地区| 色哦色哦哦色天天综合| 日本道色综合久久| 91黄视频在线| 欧美四级电影在线观看| 精品1区2区在线观看| 91麻豆精品91久久久久同性| 在线91免费看| 欧美一级黄色录像| 日韩欧美国产综合一区| 精品国产青草久久久久福利| 久久综合999| 亚洲国产精品99久久久久久久久| 国产精品免费人成网站| 亚洲视频在线一区| 一个色综合av| 日韩精品1区2区3区| 免费成人在线网站| 国产一区二区精品久久| 成a人片国产精品| 日本高清视频一区二区| 91精品国模一区二区三区| 欧美精品一区二区在线播放| 国产婷婷色一区二区三区| 亚洲天堂网中文字| 一区二区欧美在线观看| 日韩影院精彩在线| 国产综合色视频| 99久久久精品| 欧美一区日韩一区| 久久久三级国产网站| 1000部国产精品成人观看| 午夜精品久久久久久久| 激情久久久久久久久久久久久久久久| 国产一区二区免费看| 91蝌蚪porny| 欧美大黄免费观看| 日韩一区中文字幕| 五月婷婷久久综合| 国产成人精品在线看| 色老汉av一区二区三区| 日韩免费电影网站| 亚洲日本一区二区三区| 日本欧美久久久久免费播放网| 国产成人免费9x9x人网站视频| 欧美系列亚洲系列| 久久免费午夜影院| 亚洲午夜三级在线| 国产成人在线视频播放| 欧美日韩成人一区二区| 欧美极品xxx| 久久精品国产一区二区三区免费看| av电影天堂一区二区在线| 欧美一区二区在线视频| 亚洲天堂2016| 精品一区二区三区免费视频| 欧洲人成人精品| 蜜桃精品视频在线观看| 91原创在线视频| 国产亚洲成aⅴ人片在线观看| 亚洲va欧美va天堂v国产综合| 成人av集中营| 久久先锋资源网| 午夜电影一区二区| 99国产欧美久久久精品| 欧美成人a在线| 天涯成人国产亚洲精品一区av| 99久久99久久精品国产片果冻| 欧美精品一区二区久久婷婷| 国产精品电影院| 国产成人一级电影| 欧美大肚乱孕交hd孕妇| 亚洲国产成人精品视频| a4yy欧美一区二区三区| 国产三级精品三级| 久久99久久久久| 91精品国产色综合久久ai换脸| 亚洲自拍与偷拍| 色婷婷久久久亚洲一区二区三区| 欧美国产激情二区三区| 国产美女一区二区三区| 亚洲精品一区在线观看| 男人的j进女人的j一区| 一本大道久久a久久精二百| 亚洲图片你懂的| 色综合婷婷久久| 亚洲成人1区2区| 91在线观看美女| 亚洲三级在线免费观看| 91丨九色丨黑人外教| 中文字幕一区二区三区色视频 | av电影在线不卡| 国产精品三级视频| 国产精品99久久久| 久久精子c满五个校花| 国模少妇一区二区三区| 久久久国产精品午夜一区ai换脸| 国产真实乱子伦精品视频| 日韩你懂的电影在线观看| 久久99国产精品麻豆| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 国产一区二区三区在线观看免费| 亚洲香肠在线观看| 色噜噜久久综合| 亚洲午夜激情网站| 欧美卡1卡2卡| 欧美aaa在线| 国产亚洲一区二区三区在线观看| 国产成人精品一区二区三区四区| 国产精品日韩成人| 91成人免费在线视频| 三级欧美韩日大片在线看| 日韩一级在线观看| 国产大陆亚洲精品国产| 亚洲同性gay激情无套| 欧美另类久久久品| 韩国精品主播一区二区在线观看| 国产日韩亚洲欧美综合| 91免费看视频| 日本欧洲一区二区| 中文字幕免费观看一区|