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

📄 ns-default.tcl

📁 ns gpsr路由协议 在ns2平台下实现的 对大家很有好处
💻 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: /home/mole/u0/bkarp/cvsroot/ns-2.1b6/tcl/lib/ns-default.tcl,v 1.1.1.1 1999/07/29 03:27:35 bkarp 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)#Trace set src_ -1Trace set dst_ -1Trace set callback_ 0Trace set show_tcphdr_ 0Agent set fid_ 0Agent set prio_ 0Agent set addr_ -1Agent set dst_ -1Agent set flags_ 0Agent set ttl_ 32 ; # arbitrary choice hereScheduler/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/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 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 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 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_ false# 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_ false# 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.125if [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}# Http invalidation agentAgent/HttpInval set inval_hdr_size_ 40Integrator 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/SFQ set maxqueue_ 40Queue/SFQ set buckets_ 16Queue/FQ set secsPerByte_ 0# change DropTail to RED for RED on individual queuesFQLink set queueManagement_ DropTailQueue set interleave_ falseQueue set acksfirst_ falseQueue set ackfromfront_ falseQueue/DropTail set drop_front_ falseQueue/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.002Queue/RED set wait_ trueQueue/RED set linterm_ 10Queue/RED set setbit_ falseQueue/RED set gentle_ falseQueue/RED set drop_tail_ trueQueue/RED set drop_front_ falseQueue/RED set drop_rand_ falseQueue/RED set doubleq_ falseQueue/RED set ns1_compat_ falseQueue/RED set dqthresh_ 50Queue/RED set ave_ 0.0Queue/RED set prob1_ 0.0Queue/RED set curq_ 0Queue/DRR set buckets_ 10Queue/DRR set blimit_ 25000Queue/DRR set quantum_ 250Queue/DRR set mask_ 0Queue/CBQ set algorithm_ 0 ;# used by compat only, not boundQueue/CBQ set maxpkt_ 1024CBQClass set priority_ 0CBQClass set level_ 1CBQClass set extradelay_ 0.0CBQClass set def_qtype_ DropTailCBQClass set okborrow_ trueCBQClass set automaxidle_gain_ 0.9375PacketQueue/Semantic set acksfirst_ falsePacketQueue/Semantic set filteracks_ falsePacketQueue/Semantic set replace_head_ falsePacketQueue/Semantic set priority_drop_ falsePacketQueue/Semantic set random_drop_ falsePacketQueue/Semantic set reconsAcks_ falsePacketQueue/Semantic set random_ecn_ false#XXX other kinds of sinks -> should reparentAgent/TCPSink set packetSize_ 40Agent/TCPSink set maxSackBlocks_ 3Agent/TCPSink set ts_echo_bugfix_ falseAgent/TCPSink/DelAck set interval_ 100mscatch {	Agent/TCPSink/Asym set interval_ 100ms	Agent/TCPSink/Asym set maxdelack_ 5

⌨️ 快捷键说明

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