亚洲欧美第一页_禁久久精品乱码_粉嫩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| 精品国产一区二区精华| 欧美肥妇free| 久久综合九色综合97_久久久| 欧美日韩亚洲综合一区| 91美女福利视频| 日本高清成人免费播放| 在线观看亚洲a| 欧美日韩国产大片| 3d成人h动漫网站入口| 91精品福利在线一区二区三区| 宅男噜噜噜66一区二区66| 欧美高清精品3d| 精品国一区二区三区| 久久久久久一二三区| 国产精品久久久久久户外露出 | 另类专区欧美蜜桃臀第一页| 性久久久久久久久久久久| 日韩av一区二区在线影视| 免费看欧美女人艹b| 国产精品亚洲第一区在线暖暖韩国| 国产一区二区精品在线观看| 成人黄色片在线观看| 色综合久久久久| 欧美一卡2卡三卡4卡5免费| 色综合天天视频在线观看| 麻豆精品一区二区av白丝在线| 久久不见久久见免费视频1| 国产精一区二区三区| 国产在线麻豆精品观看| 亚洲精品水蜜桃| 激情文学综合丁香| 日韩免费高清电影| 免费成人美女在线观看| 日韩一区二区在线免费观看| 日韩精品久久久久久| 56国语精品自产拍在线观看| 亚洲成人激情综合网| 欧美日韩电影一区| 日av在线不卡| 精品国产3级a| 国产一区二区三区| 国产精品视频观看| 99热99精品| 亚洲图片自拍偷拍| 欧美一级欧美一级在线播放| 美女视频一区二区| 久久精品日产第一区二区三区高清版| 美国十次了思思久久精品导航| 日韩欧美不卡在线观看视频| 精品在线你懂的| 中文字幕av不卡| 欧洲精品中文字幕| 麻豆成人免费电影| 国产视频一区二区在线| 91在线国产福利| 婷婷久久综合九色综合绿巨人| 91精选在线观看| 国产乱码精品1区2区3区| 日韩一区日韩二区| 欧美放荡的少妇| 国产精品99久| 一区二区三区不卡视频| 日韩一区二区精品在线观看| 国产福利91精品一区二区三区| 国产精品高清亚洲| 欧美丝袜自拍制服另类| 韩国三级电影一区二区| 亚洲靠逼com| 欧美xxxxxxxxx| 一本在线高清不卡dvd| 免费观看91视频大全| 中文字幕在线一区二区三区| 91精品欧美福利在线观看| 国产成人av在线影院| 午夜精品久久久久久久久久| 久久精品亚洲麻豆av一区二区 | 色婷婷av一区| 强制捆绑调教一区二区| 国产精品久久久久久久久动漫 | 666欧美在线视频| 成人晚上爱看视频| 青青草原综合久久大伊人精品优势| 国产日韩欧美高清| 777亚洲妇女| 一本色道久久综合亚洲aⅴ蜜桃| 美女看a上一区| 亚洲综合久久久| 欧美激情在线免费观看| 精品久久久久久久久久久久久久久| 99久久精品国产精品久久| 精品一区二区三区免费| 亚洲成av人综合在线观看| 国产精品久久久久久久久快鸭| 日韩免费观看2025年上映的电影 | 中文在线免费一区三区高中清不卡 | 不卡在线观看av| 麻豆久久久久久久| 日韩黄色一级片| 一区二区三区欧美视频| 国产情人综合久久777777| 日本一二三四高清不卡| 亚洲精品在线电影| 日韩精品中文字幕一区| 91精品黄色片免费大全| 欧美在线短视频| 91久久精品一区二区三| 9色porny自拍视频一区二区| 国产成人精品亚洲777人妖| 黄页视频在线91| 久久综合综合久久综合| 免费高清视频精品| 免费观看在线综合| 免费欧美在线视频| 免费成人在线观看视频| 麻豆视频一区二区| 久久99久久精品| 久久成人麻豆午夜电影| 激情五月激情综合网| 九九视频精品免费| 国产精品资源站在线| 国内不卡的二区三区中文字幕| 久久99精品国产麻豆婷婷| 裸体在线国模精品偷拍| 国产一区在线观看视频| 国产一区不卡视频| 国产成人高清视频| 99这里只有精品| 91蜜桃传媒精品久久久一区二区 | 九一久久久久久| 国产一区二区在线视频| 国产福利精品导航| 97国产精品videossex| 色综合天天综合色综合av| 在线免费一区三区| 欧美美女一区二区三区| 精品欧美一区二区三区精品久久| 欧美不卡激情三级在线观看| 久久精品一区二区| 亚洲人成在线观看一区二区| 亚洲午夜激情网页| 精品影院一区二区久久久| 成人永久aaa| 欧美丝袜丝交足nylons图片| 日韩三级免费观看| 国产精品三级电影| 亚洲成人在线观看视频| 国产精品自拍网站| 99久久精品国产导航| 欧美喷潮久久久xxxxx| 日韩欧美黄色影院| 专区另类欧美日韩| 喷白浆一区二区| 成人理论电影网| 欧美二区三区91| 欧美高清在线一区二区| 视频一区中文字幕国产| 国产69精品一区二区亚洲孕妇| 色丁香久综合在线久综合在线观看| 日韩一级大片在线| 亚洲同性同志一二三专区| 蜜臀va亚洲va欧美va天堂| 99久久国产综合精品女不卡| 日韩一区二区在线看片| 亚洲视频 欧洲视频| 韩国精品主播一区二区在线观看 | 免费在线看成人av| 91小视频在线观看| 久久亚洲综合色| 亚洲va欧美va人人爽午夜| 不卡影院免费观看| 精品久久人人做人人爽| 亚洲国产婷婷综合在线精品| 国产激情视频一区二区在线观看 | 9191精品国产综合久久久久久| 欧美激情自拍偷拍| 久久成人免费日本黄色| 欧美日韩激情一区二区| 日韩美女啊v在线免费观看| 国产中文字幕精品| 777久久久精品| 亚洲综合免费观看高清完整版 | 亚洲男人的天堂在线aⅴ视频| 黑人巨大精品欧美黑白配亚洲| 欧美日韩和欧美的一区二区| **网站欧美大片在线观看| 东方aⅴ免费观看久久av| 2024国产精品视频| 麻豆91在线播放| 日韩视频一区在线观看| 天天av天天翘天天综合网| 欧洲国产伦久久久久久久| 亚洲三级免费观看| 91色在线porny| 日韩理论在线观看| 99国产精品视频免费观看|