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

📄 ns-default.tcl

📁 NS-2.28的802.11e协议扩展源代码
💻 TCL
📖 第 1 页 / 共 2 页
字号:
## Copyright (c) 1996-1997 Regents of the University of California.# 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 must retain the above copyright#    notice, this list of conditions and the following disclaimer.# 2. Redistributions in binary form must reproduce the above copyright#    notice, this list of conditions and the following disclaimer in the#    documentation and/or other materials provided with the distribution.# 3. All advertising materials mentioning features or use of this software#    must display the following acknowledgement:# 	This product includes software developed by the MASH Research# 	Group at the University of California Berkeley.# 4. Neither the name of the University nor of the Research Group may be#    used to endorse or promote products derived from this software without#    specific prior written permission.# # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF# SUCH DAMAGE.## @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-default.tcl,v 1.211 2000/08/08 06:12:32 sfloyd Exp $### Set up all the default paramters.  Each default parameter# is stored in the OTcl class template and copied from the# class into the instance when the object is created# (this happens in the Tcl/tcl-object.tcl helper library)########################################################### Intitialization for directed diffusion : ChalermekAgent/Diff_Sink set packetSize_ 512Agent/Diff_Sink set interval_   0.5Agent/Diff_Sink set random_     1Agent/Diff_Sink set maxpkts_    10000Agent/Diff_Sink set data_type_  0######################################################### Increased Floating Point Precisionset tcl_precision 17Connector set debug_ falseTTLChecker set debug_ falseTrace set src_ -1Trace set dst_ -1Trace set callback_ 0Trace set show_tcphdr_ 0Trace set debug_ falseCMUTrace set debug_ falseAgent set fid_ 0Agent set prio_ 0Agent set agent_addr_ -1Agent set agent_port_ -1Agent set dst_addr_ -1Agent set dst_port_ -1Agent set flags_ 0Agent set ttl_ 32 ; # arbitrary choice hereAgent set debug_ falseAgent set class_ 0Scheduler/RealTime set maxslop_ 0.010; # max allowed slop b4 error (sec)##Agent set seqno_ 0 now is gone##Agent set class_ 0 now is goneAgent/Ping set packetSize_ 64Agent/UDP set packetSize_ 1000Agent/UDP instproc done {} { }Agent/TCP set seqno_ 0Agent/TCP set t_seqno_ 0Agent/TCP set maxburst_ 0Agent/TCP set maxcwnd_ 0Agent/TCP set window_ 20Agent/TCP set windowInit_ 1Agent/TCP set windowInitOption_ 1Agent/TCP set syn_ falseAgent/TCP set windowOption_ 1Agent/TCP set windowConstant_ 4Agent/TCP set windowThresh_ 0.002Agent/TCP set decrease_num_ 0.5Agent/TCP set increase_num_ 1.0Agent/TCP set overhead_ 0Agent/TCP set ecn_ 0Agent/TCP set old_ecn_ 0Agent/TCP set packetSize_ 1000Agent/TCP set tcpip_base_hdr_size_ 40Agent/TCP set bugFix_ trueAgent/TCP set timestamps_ falseAgent/TCP set slow_start_restart_ trueAgent/TCP set restart_bugfix_ trueAgent/TCP set tcpTick_ 0.1Agent/TCP set maxrto_ 100000Agent/TCP set srtt_init_ 0Agent/TCP set rttvar_init_ 12Agent/TCP set rtxcur_init_ 6.0Agent/TCP set T_SRTT_BITS 3Agent/TCP set T_RTTVAR_BITS 2Agent/TCP set rttvar_exp_ 2Agent/TCP instproc done {} { }Agent/TCP set noFastRetrans_ falseAgent/TCP set dupacks_ 0Agent/TCP set ack_ 0Agent/TCP set cwnd_ 0Agent/TCP set awnd_ 0Agent/TCP set ssthresh_ 0Agent/TCP set rtt_ 0Agent/TCP set srtt_ 0Agent/TCP set rttvar_ 0Agent/TCP set backoff_ 0Agent/TCP set maxseq_ 0Agent/TCP set singledup_ 0Agent/TCP set precisionReduce_ falseAgent/TCP set ndatapack_ 0Agent/TCP set ndatabytes_ 0Agent/TCP set nackpack_ 0Agent/TCP set nrexmit_ 0Agent/TCP set nrexmitpack_ 0Agent/TCP set nrexmitbytes_ 0Agent/TCP set trace_all_oneline_ falseAgent/TCP set QOption_ 0 Agent/TCP set EnblRTTCtr_ 0Agent/TCP set control_increase_ 0# XXX Generate nam trace or plain old text trace for variables. # When it's true, generate nam trace.Agent/TCP set nam_tracevar_ falseAgent/TCP/Fack set ss-div4_ falseAgent/TCP/Fack set rampdown_ falseAgent/TCP set eln_ 0Agent/TCP set eln_rxmit_thresh_ 1Agent/TCP set delay_growth_ falseAgent/TCP set CoarseTimer_      0Agent/TCPSink set sport_        0Agent/TCPSink set dport_        0         #XXX other kinds of sinks -> should reparentAgent/TCPSink set packetSize_ 40Agent/TCPSink set maxSackBlocks_ 3Agent/TCPSink set ts_echo_bugfix_ falseAgent/TCPSink set generateDSacks_ falseAgent/TCPSink set RFC2581_immediate_ack_ trueAgent/TCPSink/DelAck set interval_ 100mscatch {	Agent/TCPSink/Asym set interval_ 100ms	Agent/TCPSink/Asym set maxdelack_ 5}Agent/TCPSink/Sack1/DelAck set interval_ 100ms# setting this to 1 implements some changes to reno # proposed by Janey Hoe (other than fixing reno's# unnecessary retransmit timeouts)Agent/TCP/Newreno set newreno_changes_ 0# setting this to 1 allows the retransmit timer to expire for# a window with many packet dropsAgent/TCP/Newreno set newreno_changes1_ 0Agent/TCP/Newreno set partial_window_deflation_ 0Agent/TCP/Newreno set exit_recovery_fix_ 0Agent/TCP/Vegas set v_alpha_ 1Agent/TCP/Vegas set v_beta_ 3Agent/TCP/Vegas set v_gamma_ 1Agent/TCP/Vegas set v_rtt_ 0Agent/TCP/Vegas/RBP set rbp_scale_ 0.75# rbp_rate_algorithm_'s are defined in tcp-rbp.cc.# 1=RBP_VEGAS_RATE_ALGORITHM (default),# 2=RBP_CWND_ALGORITHMAgent/TCP/Vegas/RBP set rbp_rate_algorithm_ 1Agent/TCP/Vegas/RBP set rbp_segs_actually_paced_ 0Agent/TCP/Vegas/RBP set rbp_inter_pace_delay_ 0Agent/TCP/Reno/RBP set rbp_scale_ 0.75Agent/TCP/Reno/RBP set rbp_segs_actually_paced_ 0Agent/TCP/Reno/RBP set rbp_inter_pace_delay_ 0# Reno/RBP supports only RBP_CWND_ALGORITHM # Agent/TCP/Reno/RBP set rbp_rate_algorithm_ 2Agent/TCP/Asym set g_ 0.125Agent/TCP/Reno/Asym set g_ 0.125Agent/TCP/Newreno/Asym set g_ 0.125# RFC793eduTcp -- 19990820, fcela@acm.orgAgent/TCP/RFC793edu set add793expbackoff_  true Agent/TCP/RFC793edu set add793jacobsonrtt_ falseAgent/TCP/RFC793edu set add793fastrtx_     falseAgent/TCP/RFC793edu set add793slowstart_   falseAgent/TCP/RFC793edu set add793additiveinc_ falseAgent/TCP/RFC793edu set add793karnrtt_     true Agent/TCP/RFC793edu set rto_               60Agent/TCP/RFC793edu set syn_               trueAgent/TCP/RFC793edu set add793exponinc_    falseAgent/TFRC set packetSize_ 1000 Agent/TFRC set df_ 0.95 ;	# decay factor for accurate RTT estimateAgent/TFRC set tcp_tick_ 0.1 ;	Agent/TFRC set ndatapack_ 0 ;	# Number of packets sentAgent/TFRC set srtt_init_ 0 ;	# Variables for tracking RTT	Agent/TFRC set rttvar_init_ 12  Agent/TFRC set rtxcur_init_ 6.0	Agent/TFRC set rttvar_exp_ 2	Agent/TFRC set T_SRTT_BITS 3	Agent/TFRC set T_RTTVAR_BITS 2	Agent/TFRC set InitRate_ 300 ;	# Initial send rate	Agent/TFRC set overhead_ 0 ;	# If > 0, dither outgoing packetsAgent/TFRC set ssmult_ 2 ; 	# Rate of increase during slow-start:Agent/TFRC set bval_ 1 ;	# Value of B for TCP formulaAgent/TFRC set ca_ 1 ; 	 	# Enable Sqrt(RTT) congestion avoidanceAgent/TFRC set printStatus_ 0 Agent/TFRC set conservative_ 0 ;  # Set to true for a conservative 				# response to heavy congestion.Agent/TFRCSink set packetSize_ 40Agent/TFRCSink set InitHistorySize_ 100000Agent/TFRCSink set NumFeedback_ 1 Agent/TFRCSink set AdjustHistoryAfterSS_ 1Agent/TFRCSink set NumSamples_ -1Agent/TFRCSink set discount_ 1;	# History DiscountingAgent/TFRCSink set printLoss_ 0Agent/TFRCSink set smooth_ 1 ;	# smoother Average Loss IntervalAgent/TFRCSink set minlc_ 4Agent/TFRCSink set algo_ 1 ;  	# 1: algo from sigcomm paper 2: ewma 				# 3: fixed windowAgent/TFRCSink set maxint_ 1000 ;     # max loss interval history Agent/TFRCSink set history_ 0.75 ;    # loss history for EWMAif [TclObject is-class Agent/TCP/FullTcp] {	Agent/TCP/FullTcp set segsperack_ 1; # ACK frequency	Agent/TCP/FullTcp set segsize_ 536; # segment size	Agent/TCP/FullTcp set tcprexmtthresh_ 3; # num dupacks to enter recov	Agent/TCP/FullTcp set iss_ 0; # Initial send seq#	Agent/TCP/FullTcp set nodelay_ false; # Nagle disable?	Agent/TCP/FullTcp set data_on_syn_ false; # allow data on 1st SYN?	Agent/TCP/FullTcp set dupseg_fix_ true ; # no rexmt w/dup segs from peer	Agent/TCP/FullTcp set dupack_reset_ false; # exit recov on ack < highest	Agent/TCP/FullTcp set interval_ 0.1 ; # delayed ACK interval 100ms 	Agent/TCP/FullTcp set close_on_empty_ false; # close conn if sent all	Agent/TCP/FullTcp set ts_option_size_ 10; # in bytes	Agent/TCP/FullTcp set reno_fastrecov_ true; # fast recov true by default	Agent/TCP/FullTcp set pipectrl_ false; # use "pipe" ctrl	Agent/TCP/FullTcp set open_cwnd_on_pack_ true; # ^ win on partial acks?	Agent/TCP/FullTcp set halfclose_ false; # do simplex closes (shutdown)?	Agent/TCP/FullTcp/Newreno set recov_maxburst_ 2; # max burst dur recov	Agent/TCP/FullTcp/Sack set sack_block_size_ 8; # bytes in a SACK block	Agent/TCP/FullTcp/Sack set sack_option_size_ 2; # bytes in opt hdr	Agent/TCP/FullTcp/Sack set max_sack_blocks_ 3; # max # of sack blks}# Default values used by wireless simulationsAgent/Null set sport_           0Agent/Null set dport_           0Agent/CBR set sport_            0Agent/CBR set dport_            0# Http invalidation agentAgent/HttpInval set inval_hdr_size_ 40Agent/RTP set seqno_ 0Agent/RTP set interval_ 3.75msAgent/RTP set random_ 0Agent/RTP set packetSize_ 210Agent/RTP set maxpkts_ 0x10000000Agent/RTP instproc done {} { }Agent/RTCP set seqno_ 0Agent/Message set packetSize_ 180Agent/LossMonitor set nlost_ 0Agent/LossMonitor set npkts_ 0Agent/LossMonitor set bytes_ 0Agent/LossMonitor set lastPktTime_ 0Agent/LossMonitor set expected_ 0# RAPAgent/RAP set packetSize_ 512Agent/RAP set seqno_ 0Agent/RAP set sessionLossCount_ 0Agent/RAP set ipg_ 2.0Agent/RAP set alpha_ 1.0Agent/RAP set beta_ 0.5Agent/RAP set srtt_ 2.0Agent/RAP set variance_ 0.0Agent/RAP set delta_ 0.5Agent/RAP set mu_ 1.2Agent/RAP set phi_ 4.0Agent/RAP set timeout_ 2.0Agent/RAP set overhead_ 0Agent/RAP set useFineGrain_ 0Agent/RAP set kfrtt_ 0.9Agent/RAP set kxrtt_ 0.01Agent/RAP set debugEnable_ 0Agent/RAP set rap_base_hdr_size_ 44Agent/RAP set dpthresh_ 50Agent/RAP instproc done {} { }# Routing protocol agentsAgent/Mcast/Control set packetSize_ 80# Dynamic routing defaultsAgent/rtProto set preference_ 200		;# global default preferenceAgent/rtProto/Direct set preference_ 100Agent/rtProto/DV set preference_	120Agent/rtProto/DV set INFINITY		 [Agent set ttl_]Agent/rtProto/DV set advertInterval	  2#Agent/Decapsulator set off_encap_ 0#Agent/Encapsulator set off_encap_ 0Agent/Encapsulator set status_ 1Agent/Encapsulator set overhead_ 20Integrator set lastx_ 0.0Integrator set lasty_ 0.0Integrator set sum_ 0.0# 10->50 to be like ns-1Queue set limit_ 50Queue set blocked_ falseQueue set unblock_on_resume_ trueQueue set interleave_ falseQueue set acksfirst_ falseQueue set ackfromfront_ falseQueue set debug_ falseQueue/SFQ set maxqueue_ 40Queue/SFQ set buckets_ 16Queue/FQ set secsPerByte_ 0# change DropTail to RED for RED on individual queuesFQLink set queueManagement_ DropTailQueue/DropTail set drop_front_ falseQueue/DropTail set pqlim_      -1	;# no s/w based QoSQueue/DropTail/PriQueue set Prefer_Routing_Protocols    1Queue/RED set bytes_ falseQueue/RED set queue_in_bytes_ falseQueue/RED set thresh_ 5Queue/RED set maxthresh_ 15Queue/RED set mean_pktsize_ 500Queue/RED set q_weight_ 0.002

⌨️ 快捷键说明

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