⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 print2.ps~

📁 obs网络试验平台
💻 PS~
📖 第 1 页 / 共 5 页
字号:
(    {) N(       StatCollector &sc = StatCollector::instance\(\);) N(       sc.updateEntry\( "UDPSND", sc.getValue\( "UDPSND" \) + 1.0 \);) N(       sc.updateEntry\( "UDPBYTESSND", sc.getValue\( "UDPBYTESSND" \) + pktsize \);) N(    }) N(    else if \(ch->ptype\(\) == PT_CBR\)) N(    {) N(       StatCollector &sc = StatCollector::instance\(\);) N(       sc.updateEntry\( "CBRSND", sc.getValue\( "CBRSND" \) + 1.0 \);) N(       sc.updateEntry\( "CBRBYTESSND", sc.getValue\( "CBRBYTESSND" \) + pktsize \);) N(    }) N(    else if \(ch->ptype\(\) == PT_EXP\)) N(    {) N(       StatCollector &sc = StatCollector::instance\(\);) N(       sc.updateEntry\( "EXPSND", sc.getValue\( "EXPSND" \) + 1.0 \);) N(       sc.updateEntry\( "EXPBYTESSND", sc.getValue\( "EXPBYTESSND" \) + pktsize \);) N(    }) N(    else if \(ch->ptype\(\) == PT_PARETO\)) N(    {) N(       StatCollector &sc = StatCollector::instance\(\);) N(       sc.updateEntry\( "PARSND", sc.getValue\( "PARSND" \) + 1.0 \);) N(       sc.updateEntry\( "PARBYTESSND", sc.getValue\( "PARBYTESSND" \) + pktsize \);) N(    }) N(    else if \(ch->ptype\(\) == PT_SELFSIM\)) N(    {) N(       StatCollector &sc = StatCollector::instance\(\);) N(       sc.updateEntry\( "SSIMSND", sc.getValue\( "SSIMSND" \) + 1.0 \);) N(       sc.updateEntry\( "SSIMBYTESSND", sc.getValue\( "SSIMBYTESSND" \) + pktsize \)) N(;) N(    }) N() N(    if \( \( currburstsize_ + pktsize \) > maxburstsize__ \)) N(         sendBurst\(\);) N(    if \( npkts_ == 0 \)) N(        bt_.resched\( burst_timeout\(\) \);) N() N(    BurstBuffer_[npkts_++] = pkt;) N(    currburstsize_ += pktsize;) N() N(    if \( currburstsize_  >= maxburstsize__ \)) N(        sendBurst\(\);) N(    // Debug::debug\( "BurstManager: added the TCP/UDP packet successfully" \);) N(}) N() N(void BurstManager::timeout\(\)) N() N() N() N() N({) N(    if\( currburstsize_ > 0 \) {) N(        sendBurst\(\);) N(    }) N(    bt_.resched\( burst_timeout\(\) \);) N(}) N() N() N(stdin) (Page 5/25) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.cc) K(  Feb 20 15:49 2004                      Page:   4) p n() N(void BurstManager::sendBurst\(\)) N({) N(    if\( currburstsize_ > 0 \) {) N(      a_->sendBurst\( BurstBuffer_, getburstid\(\), npkts_,) N(            currburstsize_, destnodeid_, offsettime__, pcntguard__,) N(            delta__ \);) N(    }) N(    resetBurstParams\(\);) N(}) N() N(void BurstManager::resetBurstParams\(\)) N({) N(    int i = 0;) N() N(    while\(BurstBuffer_[i]!= NULL && i<MAXBURSTSIZE \)) N(        BurstBuffer_[i++] = NULL;) N() N(    currburstsize_ = 0;) N(    npkts_ = 0;) N(}) N() N(int BurstManager::command\( int argc,  const char*const* argv\) {) N(    return NsObject::command\( argc, argv \);) N(}) N() N() N(/*=====================================================================*) N( *                                                                     *) N( *           Implementation of the Integrated-Agent class              *) N( *                                                                     *) N( *=====================================================================*/) N() N(// default constructor //) N(IPKTAgent::IPKTAgent\(\) : Agent\(PT_IPKT\) , BM_\( NULL \), maxindx_\( -1 \),) N(                                          seqno) S(^H^H^H^H^H) L(^H) K(^H                  ) p n(                        seqno_\(0\)) N({) N(    bind\("packetSize_", &size_\);) N(    bind\( "address_", &address_ \);) N(}) N() N() N() N() N() N() N(// handle the recv of a packet) N(void IPKTAgent::recv\( Packet *pkt, Handler *h \)) N({) N(    hdr_ip* hdrip = hdr_ip::access\(pkt\);) N(    hdr_cmn* ch = hdr_cmn::access\(pkt\);) N(    hdr_IPKT* hdr = hdr_IPKT::access\( pkt \);) N() N(    char s[200];) N() N(//    if \( \( ch->ptype\(\) == PT_TCP || ch->ptype\(\) == PT_ACK \)) N() N() N(stdin) (Page 6/25) (Feb 21, 04 14:03) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (3/13) (Saturday February 21, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (7-8) 4%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.cc) K(  Feb 20 15:49 2004                      Page:   5) p n() N(    if \( \(ch->ptype\(\) != PT_IPKT\)            //GMG -- changed this to) N(        && \( hdrip->saddr\(\)== addr\(\) \) \) {   // correspond to the) N(                                             // receipt of any data packet \(not) N(                                             //just TCP, ACK, or UDP\)) N(        BM_[hdrip->daddr\(\)].recv\( pkt, h \);) N(        return;) N(    }) N(    else if\( \( ch->ptype\(\) == PT_IPKT \) && \( hdrip->daddr\(\) == addr\(\) \) \) {) N(        if \( hdrip->prio_== 2 \)   {) N(            StatCollector &sc = StatCollector::instance\(\);) N(            sc.updateEntry\( "BURSTRCV", sc.getValue\( "BURSTRCV" \) + 1.0 \);) N() N(            /* record the end to end delay for the data-burst */         ) N(           sc.updateEntry\( "BURSTDLY", sc.getValue\( "BURSTDLY" \) + Scheduler::in) N(stance\(\).clock\(\) - hdr->end_end_delay\(\) \);) N(            if\( ch->size\(\) <= 0 \) {) N(                Debug::debug\( __FILE__, __LINE__, "Critical error occurred: Burs) N(t of size=0 found" \);) N(                exit \(-1\);) N(            }) N(            deBurst\( pkt \);) N(            return;) N(        }) N(        else if \( hdrip->prio_==1 \) {) N(            StatCollector &sc = StatCollector::instance\(\);) N(            sc.updateEntry\( "BHPRCV", sc.getValue\( "BHPRCV" \) + 1.0 \);) N(            sc.updateEntry\( "BHPDLY", sc.getValue\( "BHPDLY" \) + Scheduler::insta) N(nce\(\).clock\(\) - hdr->end_end_delay\(\) \);) N(        }) N(    }) N(    else {) N() N(    }) N(    if\( pkt != NULL \)  {) N(        Packet::free\( pkt \);) N(    }) N(}) N() N(// deburstify) N(void IPKTAgent::deBurst\(Packet *pkt\)) N({) N(    hdr_ip* hdrip = hdr_ip::access\(pkt\);) N(    hdr_IPKT* hdr = hdr_IPKT::access\( pkt \);) N(    hdr_cmn* ch = hdr_cmn::access\(pkt\);) N() N(    hdr_cmn* tcpch;) N(    int npkts = hdr->npkts\(\);) N() N(    Packet **p = \(Packet**\)pkt->accessdata\(\);) N() N(    while \( npkts--\) {) N(        tcpch = hdr_cmn::access\(*p\);) N() N(        if \(tcpch->ptype\(\) == PT_TCP\) //GMG -- added TCPRCV, ACKRCV, and UDPRCV) N(                                      // statistics collection) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "TCPRCV", sc.getValue\( "TCPRCV" \) + 1.0 \);) N(           sc.updateEntry\( "TCPBYTESRCV", sc.getValue\( "TCPBYTESRCV" \) + tcpch->) N(size\(\) \);) N(stdin) (Page 7/25) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto() p n(stdin) (Page 8/25) (Feb 21, 04 14:03) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (4/13) (Saturday February 21, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (9-10) 5%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.cc) K(  Feb 20 15:49 2004                      Page:   6) p n() N(           sc.updateEntry\( "TCPDLY", sc.getValue\( "TCPDLY" \) + Scheduler::instan) N(ce\(\).clock\(\) - tcpch->timestamp\(\) \);) N() N(        }) N(        else if \(tcpch->ptype\(\) == PT_UDP\)) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "UDPRCV", sc.getValue\( "UDPRCV" \) + 1.0 \);) N(           sc.updateEntry\( "UDPBYTESRCV", sc.getValue\( "UDPBYTESRCV" \) + tcpch->) N(size\(\) \);) N(           sc.updateEntry\( "UDPDLY", sc.getValue\( "UDPDLY" \) + Scheduler::instan) N(ce\(\).clock\(\) - tcpch->timestamp\(\) \);) N(        }) N(        else if \(tcpch->ptype\(\) == PT_ACK\)) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "ACKRCV", sc.getValue\( "ACKRCV" \) + 1.0 \);) N(        }) N(        else if \(tcpch->ptype\(\) == PT_CBR\)) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "CBRRCV", sc.getValue\( "CBRRCV" \) + 1.0 \);) N(           sc.updateEntry\( "CBRBYTESRCV", sc.getValue\( "CBRBYTESRCV" \) + tcpch->) N(size\(\) \);) N(           sc.updateEntry\( "CBRDLY", sc.getValue\( "CBRDLY" \) + Scheduler::instan) N(ce\(\).clock\(\) - tcpch->timestamp\(\) \);) N() N(        }) N(        else if \(tcpch->ptype\(\) == PT_EXP\)) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "EXPRCV", sc.getValue\( "EXPRCV" \) + 1.0 \);) N(           sc.updateEntry\( "EXPBYTESRCV", sc.getValue\( "EXPBYTESRCV" \) + tcpch->) N(size\(\) \);) N(           sc.updateEntry\( "EXPDLY", sc.getValue\( "EXPDLY" \) + Scheduler::instan) N(ce\(\).clock\(\) - tcpch->timestamp\(\) \);) N(        }) N(        else if \(tcpch->ptype\(\) == PT_PARETO\)) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "PARRCV", sc.getValue\( "PARRCV" \) + 1.0 \);) N(           sc.updateEntry\( "PARBYTESRCV", sc.getValue\( "PARBYTESRCV" \) + tcpch->) N(size\(\) \);) N(           sc.updateEntry\( "PARDLY", sc.getValue\( "PARDLY" \) + Scheduler::instan) N(ce\(\).clock\(\) - tcpch->timestamp\(\) \);) N(        }) N(        else if \(tcpch->ptype\(\) == PT_SELFSIM\)) N(        {) N(           StatCollector &sc = StatCollector::instance\(\);) N(           sc.updateEntry\( "SSIMRCV", sc.getValue\( "SSIMRCV" \) + 1.0 \);) N(           sc.updateEntry\( "SSIMBYTESRCV", sc.getValue\( "SSIMBYTESRCV" \) + tcpch) N(->size\(\) \);) N(           sc.updateEntry\( "SSIMDLY", sc.getValue\( "SSIMDLY" \) + Scheduler::inst) N(ance\(\).clock\(\) - tcpch->timestamp\(\) \);) N(        }) N() N(        send\(*p,0\);) N(        p++;) N(    }) N(    Packet::free\(pkt\);) N(stdin) (Page 9/25) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(}) p n() N(void IPKTAgent::sendBurst\( Packet** pBurst, int bid, int npkts,) N(    int burstsize, int destnode, double offsettime, int pcntguard,) N(    double delta \)) N({) N() N() N(stdin) (Page 10/25) (Feb 21, 04 14:03) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (5/13) (Saturday February 21, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (11-12) 6%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.cc) K(  Feb 20 15:49 2004                      Page:   7) p n() N(    char s[100];) N() N(    // This block sends a burst header packet BHP //) N(    Packet* pkt_bhp = allocpkt\(\);) N(    hdr_ip* hdr_ip_bhp = hdr_ip::access\(pkt_bhp\);) N(    hdr_IPKT *hdr_IPKT_bhp = hdr_IPKT::access\(pkt_bhp\);) N(    hdr_cmn* cmn_bhp = hdr_cmn::access\(pkt_bhp\);) N() N(    hdr_ip_bhp->daddr\(\) = destnode;) N(    hdr_ip_bhp->prio_ = 1;  // BHP) N(    hdr_ip_bhp->fid_ = 1;  // BHP; GMG added --  put into IP header flow ID) N(       // for use with trace file \(trace file prints flow id but not priority;) N(       // need to have indication in trace file of whether IPKT is BHP or DB\)) N() N(    // set the values into the individual bhp elements) N(    hdr_IPKT_bhp->C_burst_id_   = bid;) N(    hdr_IPKT_bhp->C_burst_size_ = size_ + burstsize;) N(    hdr_IPKT_bhp->offset_time_   = offsettime;) N(    hdr_IPKT_bhp->delta_ = delta;) N(    hdr_IPKT_bhp->pcntguard_ = pcntguard;) N(    hdr_IPKT_bhp->end_end_delay_ = Scheduler::instance\(\).clock\(\);) N(    //GMG -- update the IPKT sequence number, and put into the BHP) N(    hdr_IPKT_bhp->seqno = seqno_;) N(    send\(pkt_bhp,0\);   // send the BHP immediately) N(    StatCollector &sc = StatCollector::instance\(\);) N(    sc.updateEntry\( "BHPSND", sc.getValue\( "BHPSND" \) + 1.0 \);) N() N(    //char s[100];) N(    // This is to send the burst pkt //) N(    Packet* pkt_burst   = allocpkt\(\);) N(    hdr_ip* hdr_ip_burst = hdr_ip::access\(pkt_burst\);) N(    hdr_IPKT* hdr_IPKT_burst = hdr_IPKT::access\(pkt_burst\);) N() N(    hdr_cmn* cmn_burst = hdr_cmn::access\(pkt_burst\);) N(    ) N(    //copy the payload) N(    pkt_burst->allocdata\(npkts*sizeof\(Packet*\)\);) N(    // memcpy could be heavy) N(    memcpy\(pkt_burst->accessdata\(\),pBurst,npkts*sizeof\(Packet*\)\);) N(  ) N(    hdr_ip_burst->daddr\(\) = destnode;) N(    hdr_ip_burst->prio_ = 2; // Prio=2 indicated burst pkt sent) N(    hdr_ip_burst->fid_ = 2;  // BHP; GMG added --  put into IP header flow ID) N(       // for use with trace file \(trace file prints flow id but not priority;) N(       // need to have indication in trace file of whether IPKT is BHP or DB\)) N() N(    hdr_IPKT_burst->C_burst_id_   = bid;) N(    hdr_IPKT_burst->C_burst_size_ = burstsize;) N(    hdr_IPKT_burst->offset_time_   = offsettime;) N(    hdr_IPKT_burst->end_end_delay_ = Scheduler::instance\(\).clock\(\);) N() N(    hdr_IPKT_burst->npkts\(\) = npkts;) N() N(    cmn_burst->size\(\) +=  burstsize;) N(    sprintf\( s, "Sending a DB to node : %d", destnode \);) N(    // Debug::debug \( s \);) N() N(stdin) (Page 11/25) (Feb 21, 04 14:03) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(integrated_agent.cc) K(  Feb 20 15:49 2004                      Page:   8) p n() N() N(    //GMG -- put the IPKT sequence number into the DB; note that the DB and) N(    //corresponding BHP have the same sequence number) N(    hdr_IPKT_burst->seqno = \(seqno_++\);) N

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -