Hi, I have a variable in Trace class (trace.h). That named ntcCount_ I want to access this variable using tcl: I use bind("ntcCount_", &ntcCount_); and in tcl file: set mytrace [new Trace] and get value of this variable: puts "value = [$mytrace set ntcCount_]" But I Can't. Some error occur. Please help me. thanks
=========================== Nguyen Tan Cam 0909.33.25.47 HCMUS =========================== --- On Thu, 7/16/09, ns-users-requ...@isi.edu <ns-users-requ...@isi.edu> wrote: > From: ns-users-requ...@isi.edu <ns-users-requ...@isi.edu> > Subject: Ns-users Digest, Vol 67, Issue 15 > To: ns-users@ISI.EDU > Date: Thursday, July 16, 2009, 7:00 AM > Send Ns-users mailing list > submissions to > ns-users@isi.edu > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.isi.edu/mailman/listinfo/ns-users > or, via email, send a message with subject or body 'help' > to > ns-users-requ...@isi.edu > > You can reach the person managing the list at > ns-users-ow...@isi.edu > > When replying, please edit your Subject line so it is more > specific > than "Re: Contents of Ns-users digest..." > > > Today's Topics: > > 1. Droptail queue per-flow rate limiting > using TokenBucket (or > other mechanism?) (Prajjwal Devkota) > 2. Fw: security enhancement in AODV > (S.M.Mehdi Feiz) > 3. Calculate Delay (Thavouth > Khoun) > 4. problems with monitor-queue (Tom G) > 5. define PAN Co-ordinator in star > topology for WSN (Ravit Sachasiri) > 6. fyi - rough multiagents + ns2 code > (kanishka azimi) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 14 Jul 2009 20:05:28 -0500 > From: Prajjwal Devkota <prajj...@gmail.com> > Subject: [ns] Droptail queue per-flow rate limiting using > TokenBucket > (or other mechanism?) > To: ns-users@ISI.EDU > Message-ID: > <71561c940907141805u4cb4b649i6df90def67f8...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi list, > > I am currently doing some ethernet level rate limiting > simulations using > ns-2. I had been doing my simulations with a simple > DropTail queue (by > physically changing the link rate), but now, I am trying to > see if I can > apply a Token Bucket implementation to support multiple > flows in a simple > manner. I have been searching the mailing list to I > can find pointers on > getting started, as well as some of the ns-2 code (using a > source browser), > but I have generally only found references to > Diffserv. I did notice that > ns-2 does have a TokenBucket class implemented > though. However, as far as I > can see, diffserv seems to be the only one referencing this > class. > > I came across this discussion on the ns users mailing list > at > http://mailman.isi.edu/pipermail/ns-users/2005-June/050699.html > and the conclusion seems to be that using Diffserv > with the queue mode > being specified as DropTail was what a solution. > > My rate limiting simply requires token bucket mechanism: > once I know the > flow-id, I will have to do token bucket rate limiting > myself. As per my > understanding, diffserv is a class based qos mechanism, not > a flow based > one. Is looking into diffserv a good choice, or is > there a better solution, > or one that might be more appropriate for my requirements? > > I would appreciate any pointers that you could offer on > this. > > Thank you very much for your help! > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jul 2009 00:00:23 -0700 (PDT) > From: "S.M.Mehdi Feiz" <smmf...@yahoo.com> > Subject: [ns] Fw: security enhancement in AODV > To: ns2-mailing list <ns-users@ISI.EDU> > Message-ID: <766676.6917...@web62102.mail.re1.yahoo.com> > Content-Type: text/plain; charset=us-ascii > > > > --- On Wed, 7/15/09, S.M.Mehdi Feiz <smmf...@yahoo.com> > wrote: > > From: S.M.Mehdi Feiz <smmf...@yahoo.com> > Subject: > To: "ns2-mailing list" <ns-users@ISI.EDU> > Date: Wednesday, July 15, 2009, 11:25 AM > > hi all > I want to add security enhancement for aodv routing in ns2. > how can i add security in AODV? > please, help me. > Thanks > Mehdi Feiz > > > > > > > > > ------------------------------ > > Message: 3 > Date: Wed, 15 Jul 2009 01:36:40 -0700 (PDT) > From: Thavouth Khoun <thavouth.nsu...@yahoo.com> > Subject: [ns] Calculate Delay > To: nsusers <ns-users@ISI.EDU> > Message-ID: <490892.49419...@web111602.mail.gq1.yahoo.com> > Content-Type: text/plain; charset=us-ascii > > Hi all, > > > I want to calculate the delay from the following trace file > and print it. > Please help me! The first line is the start time and last > line is end time. > > > s 40.045779727 _3_ MAC --- 0 PRRQ 54 [0 ffffffff 3 0] > > r 40.046211758 _1_ MAC --- 0 PRRQ 54 [0 ffffffff 3 0] > > s 40.046421758 _1_ MAC --- 0 PRRP 76 [0 3 1 f105] > r 40.047029789 _3_ MAC --- 0 PRRP 76 [0 3 1 f105] > s 40.047039789 _3_ MAC --- 0 ACK 40 [0 1 0 0] > r 40.047359819 _1_ MAC --- 0 ACK 40 [0 1 0 0] > s 40.048309789 _3_ MAC --- 752 cbr 270 [14a 0 3 800] > ------- [3:0 5:0 32 0] [752] 0 0 > s 40.049444698 _3_ MAC --- 752 cbr 270 [14a 0 3 800] > ------- [3:0 5:0 32 0] [752] 0 0 > s 40.058279607 _3_ MAC --- 752 cbr 270 [14a 0 3 800] > ------- [3:0 5:0 32 0] [752] 0 0 > s 40.065334516 _3_ MAC --- 0 AUTH 60 [0 1 3 0] > r 40.065814547 _1_ MAC --- 0 AUTH 60 [0 1 3 0] > s 40.066244547 _1_ MAC --- 0 AUTH 60 [14a 3 1 0] > r 40.066724577 _3_ MAC --- 0 AUTH 60 [14a 3 1 0] > s 40.066734577 _3_ MAC --- 0 ACK 40 [0 1 0 0] > r 40.067054608 _1_ MAC --- 0 ACK 40 [0 1 0 0] > s 40.080584577 _3_ MAC --- 0 ACRQ 54 [0 1 3 0] > r 40.081016608 _1_ MAC --- 0 ACRQ 54 [0 1 3 0] > s 40.081286608 _1_ MAC --- 0 ACRP 56 [0 3 1 0] > r 40.081734639 _3_ MAC --- 0 ACRP 56 [0 3 1 0] > s 40.081744639 _3_ MAC --- 0 ACK 40 [0 1 0 0] > r 40.082064670 _1_ MAC --- 0 ACK 40 [0 1 0 0] > s 40.097294639 _3_ MAC --- 0 EAPs 54 [0 1 3 0] > r 40.097726670 _1_ MAC --- 0 EAPs 54 [0 1 3 0] > s 40.098036670 _1_ MAC --- 0 ERqI 1500 [0 3 1 0] > r 40.110036700 _3_ MAC --- 0 ERqI 1500 [0 3 1 0] > s 40.110166790 _0_ MAC --- 0 BCN 76 [0 ffffffff 0 > 190e] > r 40.110774813 _2_ MAC --- 0 BCN 76 [0 ffffffff 0 > 190e] > r 40.110774824 _4_ MAC --- 0 BCN 76 [0 ffffffff 0 > 190e] > r 40.110774840 _6_ MAC --- 0 BCN 76 [0 ffffffff 0 > 190e] > r 40.110774844 _5_ MAC --- 0 BCN 76 [0 ffffffff 0 > 190e] > r 40.110774910 _1_ MAC --- 0 BCN 76 [0 ffffffff 0 > 190e] > s 40.126744919 _3_ MAC --- 0 ERpI 1500 [0 1 3 0] > r 40.138744950 _1_ MAC --- 0 ERpI 1500 [0 1 3 0] > s 40.138894950 _1_ MAC --- 0 ERqC 1500 [0 3 1 0] > r 40.150894980 _3_ MAC --- 0 ERqC 1500 [0 3 1 0] > s 40.156504980 _3_ MAC --- 0 ERpC 1500 [0 1 3 0] > r 40.168505011 _1_ MAC --- 0 ERpC 1500 [0 1 3 0] > s 40.168815011 _1_ MAC --- 0 ERqS 56 [0 3 1 0] > r 40.169263042 _3_ MAC --- 0 ERqS 56 [0 3 1 0] > s 40.184793042 _3_ MAC --- 0 ERpA 54 [0 1 3 0] > r 40.185225073 _1_ MAC --- 0 ERpA 54 [0 1 3 0] > s 40.185315073 _1_ MAC --- 0 ESuc 56 [0 3 1 0] > r 40.185763103 _3_ MAC --- 0 ESuc 56 [0 3 1 0] > s 40.200230000 _1_ MAC --- 0 BCN 76 [0 ffffffff 1 > a119] > r 40.200838031 _3_ MAC --- 0 BCN 76 [0 ffffffff 1 > a119] > r 40.200838084 _5_ MAC --- 0 BCN 76 [0 ffffffff 1 > a119] > r 40.200838120 _0_ MAC --- 0 BCN 76 [0 ffffffff 1 > a119] > s 40.201448120 _0_ MAC --- 0 BCN 76 [0 ffffffff 0 > c919] > r 40.202056143 _2_ MAC --- 0 BCN 76 [0 ffffffff 0 > c919] > r 40.202056154 _4_ MAC --- 0 BCN 76 [0 ffffffff 0 > c919] > r 40.202056170 _6_ MAC --- 0 BCN 76 [0 ffffffff 0 > c919] > r 40.202056175 _5_ MAC --- 0 BCN 76 [0 ffffffff 0 > c919] > r 40.202056240 _1_ MAC --- 0 BCN 76 [0 ffffffff 0 > c919] > s 40.203686250 _3_ MAC --- 0 Ekey 54 [0 1 3 0] > r 40.204118281 _1_ MAC --- 0 Ekey 54 [0 1 3 0] > s 40.204408281 _1_ MAC --- 0 Ekey 324 [0 3 1 0] > r 40.207000312 _3_ MAC --- 0 Ekey 324 [0 3 1 0] > s 40.220990312 _3_ MAC --- 0 Ekey 388 [0 1 3 0] > r 40.224094342 _1_ MAC --- 0 Ekey 388 [0 1 3 0] > s 40.224584342 _1_ MAC --- 0 Ekey 292 [0 3 1 0] > r 40.226920373 _3_ MAC --- 0 Ekey 292 [0 3 1 0] > s 40.242680373 _3_ MAC --- 0 TSrq 864 [0 1 3 0] > r 40.249592404 _1_ MAC --- 0 TSrq 864 [0 1 3 0] > s 40.249822404 _1_ MAC --- 0 TSrp 1040 [0 3 1 0] > r 40.258142435 _3_ MAC --- 0 TSrp 1040 [0 3 1 0] > > > thanks, > > Thavouth K. > > > > > ------------------------------ > > Message: 4 > Date: Wed, 15 Jul 2009 14:24:59 +0000 (GMT) > From: Tom G <forenm...@yahoo.de> > Subject: [ns] problems with monitor-queue > To: ns users <ns-users@ISI.EDU> > Message-ID: <966364.74764...@web24713.mail.ird.yahoo.com> > Content-Type: text/plain; charset=iso-8859-1 > > Hi, > here I am again with a question. > > I included the monitor-queue, but in its vatiable it gets > only stupid trash like > _o139 > _o145 > _o151 > _o157 > _o163 > _o169 > _o175 > _o181 > _o187 > _o193 > I tried the whole day zu fix this bug, but now I'm sad of > it and a bit stressed :) > > I've got also the problem with the colorisation of my > strams > I'd tried like described in a Marc Greis tutorial, but I > think, my problem is a kind different. > So if i set > "$ns color 0 Red" both streams are red, so long, but I have > no class which says that 0 is red.Or if I say > If I define 1 as Red, both streams are black > "$ns color n1 Green", both streams are green... why? > please help me out. > > here's my code following > I marked my Sources of stress with a "?" > > # new simulator / Neuer Simulator > set ns [new Simulator] > #Open the output files / ?ffnen neuer outputfiles > set f0 [open out0.tr w] > set f1 [open out1.tr w] > set f2 [open out2.tr w] > #Open file for nam tracing > set nf [open out1.nam w] > $ns namtrace-all $nf > #creating new nodes / Erzeugen von Nodes > set n0 [$ns node] > set n1 [$ns node] > set n2 [$ns node] > set n3 [$ns node] > set n4 [$ns node] > set n5 [$ns node] > $n0 color "blue" > $n1 color "green" > $n2 color "black" > $n3 color "black" > $n4 color "blue" > $n5 color "Green" > $n0 label "Audio Source" > $n1 label "PC1" > $n2 label "Switch1" > $n3 label "Switch2" > $n4 label "Audio sink" > $n5 label "PC2" > #connect the nodes / Verbinden der Nodes > $ns duplex-link $n0 $n2 100Mb 10ms DropTail > $ns duplex-link $n1 $n2 100Mb 10ms DropTail > $ns duplex-link $n3 $n2 100Mb 10ms DropTail > $ns duplex-link $n4 $n3 100Mb 10ms DropTail > $ns duplex-link $n5 $n3 100Mb 10ms DropTail > #arrange the nodes / Anordnung der Nodes > $ns duplex-link-op $n0 $n2 orient right-down > $ns duplex-link-op $n1 $n2 orient right-up > $ns duplex-link-op $n2 $n3 orient right > $ns duplex-link-op $n3 $n4 orient right-up > $ns duplex-link-op $n3 $n5 orient right-down > #color the streams / Markierung der St?me > $ns color 1 Red > ;# <--? > $ns color 2 Green > ;# <--? > > proc record {} { > global sink4 sink5 f0 f1 f2 n2 n3 > #Get an instance of the simulator > set ns [Simulator instance] > #Set the time after which the procedure should be called > again > set time 0.5 > #How many bytes have been received by the traffic sinks? > set bw0 [$sink4 set bytes_] > set bw1 [$sink5 set bytes_] > set mon [$ns monitor-queue $n2 $n3 qtrace] ;# > sampleinterval qtrace <--? > #Get the current time > set now [$ns now] > #Calculate the bandwidth (in MBit/s) and write it to the > files > puts $f0 "$now [expr $bw0/$time*8/1000000]" > puts $f1 "$now [expr $bw1/$time*8/1000000]" > puts $f2 "$mon" ;# [expr $mon/$time*8/1000]" > ;# <--? > #Reset the bytes_ values on the traffic sinks > $sink4 set bytes_ 0 > $sink5 set bytes_ 0 > #Re-schedule the procedure > $ns at [expr $now+$time] "record" > } > > proc attach-expoo-traffic { node sink size burst idle rate > agent traffica } { > #Get an instance of the simulator > set ns [Simulator instance] > #Erzeugen neuer Agents und konfig. parameter setzen > set source [new Agent/$agent] > $ns attach-agent $node $source > #Create an Expootraffic agent and set its configuration > parameters > set traffic [new Application/Traffic/$traffica] > $traffic set packetSize_ $size > $traffic set burst_time_ $burst > $traffic set idle_time_ $idle > $traffic set rate_ $rate > # Attach traffic source to the traffic generator > $traffic attach-agent $source > #Connect the source and the sink > $ns connect $source $sink > return $traffic > } > > #Finishprozedur hinzuf?gen > proc finish {} { > global ns nf f0 f1 f2 > $ns flush-trace > close $f0 > close $f1 > close $f2 > close $nf > exec xgraph out0.tr out1.tr out2.tr -geometry > 800x400 & > exec nam out1.nam & > exit 0 > } > #create the two sink / zwei Empf?nger erzeugen > set sink4 [new Agent/LossMonitor] > set sink5 [new Agent/LossMonitor] > $ns attach-agent $n4 $sink4 > $ns attach-agent $n5 $sink5 > #create the two sources / zwei Sources erzeugen > set rtp0 [attach-expoo-traffic $n0 $sink4 5000kb 0.02s > 0.05s 100k RTP RealAudio] > set udp1 [attach-expoo-traffic $n1 $sink5 1250kb 2s 0.5s > 500k UDP CBR] > #distinguish the streams / Unterscheiden der > Verkehrsstr?me > $rtp0 set class_ 1 > > ;# <--? > $udp1 set class_ 2 > > ;# <--? > #watch the queue / ?berwachen der Warteschlange > $ns duplex-link-op $n2 $n3 queuePos 0.5 > $ns duplex-link-op $n3 $n2 queuePos 0.5 > #start record / Aufnahme beginnen > $ns at 0.0 "record" > #define start stop / Sendebeginn und -ende definieren > $ns at 0.2 "$udp1 start" > $ns at 4.1 "$udp1 stop" > $ns at 0.1 "$rtp0 start" > $ns at 4.5 "$rtp0 stop" > #fix simulation time / Simulationsdauer festlegen > $ns at 5.0 "finish" > #start simulation / starten der Simulation > $ns run > > > > > ------------------------------ > > Message: 5 > Date: Wed, 15 Jul 2009 16:47:14 +0200 > From: Ravit Sachasiri <r.sachas...@isae.fr> > Subject: [ns] define PAN Co-ordinator in star topology for > WSN > To: ns-users@ISI.EDU, > manna...@galena.dcc.ufmg.br > Message-ID: > <72c728fe0907150747t695b9ec4q748ba22df7f20...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi all, > > In a WPAN scenerio, I have 2 PAN Co-ordinators with 8 > nodes. I want to > prematurely define which PAN co-ordinator each node must > connect to. > However, I want it to attach itself to the PAN co-ordinator > automatically > through the beacon. > > Could someone guide me to the right command? > > Sincerely, > Ravit > > > ------------------------------ > > Message: 6 > Date: Wed, 15 Jul 2009 16:40:12 -0400 > From: kanishka azimi <nish2...@yahoo.com> > Subject: [ns] fyi - rough multiagents + ns2 code > To: ns-users@ISI.EDU > Message-ID: > <1430fe620907151340o355298ap16f490ad91ddb...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > i recently developed some programs that involved > integrating ns2 with > a multiagent simulator. some of the multiagent simulator is > also > re-implemented inside of the program. > > the simulator is for a very specific scenario, but the > tehniques used > to expose ns2, communicate agent message traffic with it, > could be > useful. here is the page desribing it. there is a download > link within > that page. (the download is a little large, because we > aimed to have > it mostly ready to run. it includes the integrating > program, > simulator, and a customized ns2.) also, a warning that the > integration > is written mostly in scheme (sisc/java), with some pieces > implemented > in ns2's tcl. > > http://cdfrbrk.pbworks.com/ns2-simulator-bridge-howto > > i might not end up reading any responses to this > thread on the list, > unless you email me directly > > -kanishka > > > ------------------------------ > > _______________________________________________ > Ns-users mailing list > Ns-users@isi.edu > http://mailman.isi.edu/mailman/listinfo/ns-users > > > End of Ns-users Digest, Vol 67, Issue 15 > **************************************** >