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

📄 patch_gprs

📁 用C++编写的GPRS协议栈源代码
💻
📖 第 1 页 / 共 5 页
字号:
52c52,53< ---> //#define MAX_CHANNELS>  Only in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a: nsdiff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/packet.h ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/packet.h57a58> #define HDR_MAC_GPRS(p) ((hdr_mac_gprs *)hdr_mac::access(p))58a60,63>  /* sandy's hack for the rlc layer*/> #define HDR_RLC(p)      (hdr_rlc::access(p))> #define HDR_RLCACK(p)   (hdr_rlcack::access(p)) >  125a131,134> 	//sandy's hack for acked ll, rlc...> 	PT_LLACK,> 	PT_RLCACK,> 	194a204,207> 		// sandy's... for ll ack.> 		name_[PT_LLACK]="ll_ack";> 		name_[PT_RLCACK]="rlc_ack";> 		 388a402,403> 	int chan_ ;// the "freq channel" this pkt shud be sent on. for GPRS -rj> 	397,398c412,413<         FailureCallback xmit_failure_; <         void *xmit_failure_data_;--->     FailureCallback xmit_failure_; >     void *xmit_failure_data_;405c420<         int     xmit_reason_;--->     int     xmit_reason_;410,411c425,426<         int num_forwards_;	// how many times this pkt was forwarded<         int opt_num_forwards_;   // optimal #forwards--->     int num_forwards_;	// how many times this pkt was forwarded>     int opt_num_forwards_;   // optimal #forwards426a442> 	inline int& chan() { return (chan_); } ;//for GPRS -rjOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/plm: cbr-traffic-PP.oOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/plm: loss-monitor-plm.odiff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/priqueue.cc ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/priqueue.cc47c47< //#include <cmu/cmu-trace.h>---> #include <address.h> 86d85<         if(Prefer_Routing_Protocols) {88,98c87,99<                 switch(ch->ptype()) {< 		case PT_DSR:< 		case PT_MESSAGE:<                 case PT_TORA:<                 case PT_AODV:<                         recvHighPriority(p, h);<                         break;< <                 default:<                         Queue::recv(p, h);<                 }--->  >  	if(Prefer_Routing_Protocols) {> >        switch(ch->ptype()) {> 			case PT_DSR:> 			case PT_MESSAGE:>             case PT_TORA:>             case PT_AODV:> 				recvHighPriority(p, h);>                 break;> >             default:>                  Queue::recv(p, h);100,101c101,104<         else {<                 Queue::recv(p, h);--->     }>     else {> 			> 			Queue::recv(p, h);139a143> 	  148a153>   Only in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a: ptypes2tcldiff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/queue.cc ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/queue.cc86c86< 	pq_(0)			/* temporarily NULL */---> 	pq_(0)/*, mac_(0)*/			/* temporarily NULL */94c94< {---> { 96a97> 	102a104> 		103a106,107> 		> 		108a113> 		127c132< 	while ((p = deque()) != 0)---> 	while ((p = deque()) != 0){128a134> 	}	129a136,138> > > diff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/queue.h ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/queue.h41a42> #include "address.h"42a44> //#include <mac.h> 56a59> 58a62> 		63a68> 		125a131> Only in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/rap: media-app.oOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/rap: rap.oOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/rap: raplist.oOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/rap: utilities.oOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/realaudio: realaudio.oOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a: rlc-timers.ccOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a: rlc-timers.hOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a: rlc.ccOnly in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a: rlc.hdiff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/snoop.cc ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/snoop.cc673a674> 		Only in ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib: ns-autoconf.tcldiff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib/ns-default.tcl ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib/ns-default.tcl2c2,31< #---> > # Modified and extended by Sandeep Kumar, Kopparapu Suman and Richa> # Jain, Indian Institute of Technology, Bombay.> # June, 2001.> >  # Copyright (c) 2001 Indian Insitute of Technology, Bombay.  >  # All rights reserved.>  #>  # Redistribution and use in source and binary forms, with or without>  # modification, are permitted provided that the following conditions>  # are met:>  # >  # 1. Redistributions of source code and binary code must contain>  # the above copyright notice, this list of conditions and the following >  # disclaimer.>  # >  # 2. All advertising materials mentioning features or use of this software>  # must display the following acknowledgement: >  # This product includes software developed at Indian Insitute of>  # Technology, Bombay. >  #>  # 3. The name of the Institute may not be used to endorse or promote >  # products derived from this software without specific prior written >  # permission.>  # INDIAN INSTITUTE OF TECHNOLOGY, BOMBAY, MAKES NO REPRESENTATIONS >  # CONCERNING EITHER THE MERCHANTABILITY OF THIS SOFTWARE OR THE >  # SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE.  The software >  # is provided "as is" without express or implied warranty of any kind.> > 442c471< Mac/Tdma set slot_packet_len_	1500---> Mac/Tdma set slot_packet_len_	1500; #GPRS radioblock size=20-50bytes.445,447c474,486< LL set mindelay_                50us< LL set delay_                   25us< LL set bandwidth_               0       ;# not used---> # rj for gprs-tdma:> Mac/Gprs set slot_packet_len_	50; #GPRS radioblock size=20-50bytes.> Mac/Gprs set max_num_ms_	64> Mac/Gprs set max_num_freq_	2> Mac/Gprs set gprs_slots_per_frame_ 4> Mac/Gprs set gprs_ 1 ;# 1=>gprs MS, 0=> gsm MS> Mac/Gprs set verbose_ 0; #1=> details of MAC working  printed. 0=>not.> Mac/Gprs set rlc_error_ 1; #1=> error; 0=> no error> Mac/Gprs set error_rate_ 1000; # max random num for error> > LL set mindelay_ 50us> LL set delay_ 25us> LL set bandwidth_ 0   ;# not used448a488,505> > #for acked ll and rlc  -sandy                   > LL set acked_    1> LL set llfraged_ 1;# 1-frag.....0-nofrag> LL set llfragsz_ 500;# ll fragment size                             > LL set llverbose_ 0;> > RLC set mindelay_   50us> RLC set delay_      25us> RLC set bandwidth_  0       ;# not used> RLC set debug_ false> RLC set macDA_      0 ;#sandy uhoh. dunno> RLC set acked_      1 ;#1 if acked..0 if non-acked> RLC set rlcfraged_  1;# 1-frag.......0-nofrag> RLC set rlcfragsz_  45;# rlc frag size> RLC set rlcverbose_ 0;> #--sandy's additions end here                                            > diff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib/ns-lib.tcl ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib/ns-lib.tcl1a2,31> > # Modified and extended by Sandeep Kumar, Kopparapu Suman and Richa> # Jain, Indian Institute of Technology, Bombay.> # June, 2001.> >  # Copyright (c) 2001 Indian Insitute of Technology, Bombay.  >  # All rights reserved.>  #>  # Redistribution and use in source and binary forms, with or without>  # modification, are permitted provided that the following conditions>  # are met:>  # >  # 1. Redistributions of source code and binary code must contain>  # the above copyright notice, this list of conditions and the following >  # disclaimer.>  # >  # 2. All advertising materials mentioning features or use of this software>  # must display the following acknowledgement: >  # This product includes software developed at Indian Insitute of>  # Technology, Bombay. >  #>  # 3. The name of the Institute may not be used to endorse or promote >  # products derived from this software without specific prior written >  # permission.>  # INDIAN INSTITUTE OF TECHNOLOGY, BOMBAY, MAKES NO REPRESENTATIONS >  # CONCERNING EITHER THE MERCHANTABILITY OF THIS SOFTWARE OR THE >  # SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE.  The software >  # is provided "as is" without express or implied warranty of any kind.      > #########################################################################> 177a208,209> # rj> source ../mobility/noah.tcl251c283< #                  -adhocRouting   DSDV/DSR/TORA---> #                  -adhocRouting   DSDV/DSR/TORA/NOAH -rj277a310> Simulator instproc rlcType {val} { $self set rlcType_ $val } ;#sandy's rlc 466,467c499,500< 		initialEnergy_ txPower_ rxPower_ idlePower_ \< 		topoInstance_ level1_ level2_---> 		initialEnergy_ txPower_ rxPower_ idlePower_ rlcType_ \> 		topoInstance_ level1_ level2_ 491a525,529> > 		#rj> 		NOAH {> 		 	set ragent [$self create-noah-agent $node]>         }  514,515c552,554< 	$node add-interface $chan $propInstance_ $llType_ $macType_ \< 			$ifqType_ $ifqlen_ $phyType_ $antType_---> 	$node add-interface $chan $propInstance_ $llType_ $rlcType_ $macType_ \> 			$ifqType_ $ifqlen_ $phyType_ $antType_ > 622a662,691> > # rj> Simulator instproc create-noah-agent { node } {> 	# Create a noah routing agent for this node> 	set ragent [new Agent/NOAH]  > > 	## setup address (supports hier-addr) for noah agent>     ## and mobilenode> 	set addr [$node node-addr] > > 	$ragent addr $addr> 	$ragent node $node > 	> 	if [Simulator set mobile_ip_] {> 		$ragent port-dmux [$node set dmux_]> 	}  > 	$node addr $addr>     $node set ragent_ $ragent > >     #delay till after add interface> 	# $node attach $ragent 255> > 	#$self at 0.0 "$ragent start-noah"    ;# start updates> 	> 	return $ragent> }                  > > > > diff -r ns2b7a-original/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib/ns-mobilenode.tcl ns-richa-gprs/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib/ns-mobilenode.tcl2c2,31< #---> > # Modified and extended by Sandeep Kumar, Kopparapu Suman and Richa> # Jain, Indian Institute of Technology, Bombay.> # June, 2001.> >  # Copyright (c) 2001 Indian Insitute of Technology, Bombay.  >  # All rights reserved.>  #>  # Redistribution and use in source and binary forms, with or without

⌨️ 快捷键说明

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