hi all, I am facing problem when i am using baodv.tcl using awl script.I am not able to understand about the error. please help me in this regard. [r...@localhost aodv]# ns baodv.tcl num_nodes is set 20 Creating nodes.... INITIALIZE THE LIST xListHead _o15 _o37 _o59 _o81 _o103 _o125 _o147 _o169 _o191 _o213 _o235 _o257 _o279 _o301 _o323 _o345 _o367 _o389 _o411 _o433 Loading random scenario pattern... Loading Connection Pattern... Starting Simulation SORTING LISTS ...DONE! channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 ns: finish: awk: packetloss.awk:23: END blocks must have an action part while executing "exec awk -f packetloss.awk scripttr.tr" (procedure "finish" line 6) invoked from within "finish"
#This program is used to calculate the packet loss rate for CBR program BEGIN { # Initialization. Set two variables. fsDrops: packets drop. numFs: packets sent fsDrops = 0; numFs = 0; } { action = $1; time = $2; from = $3; to = $4; type = $5; pktsize = $6; flow_id = $8; src = $9; dst = $10; seq_no = $11; packet_id = $12; if (from==1 && to==2 && action == "+") numFs++; if (flow_id==2 && action == "d") fsDrops++; } END { printf("number of packets sent:%d lost:%d\n", numFs, fsDrops); }it's very urgent for my work.... regards Umang BVICAM,ND-63 _________________________________________________________________ Bollywood This Decade http://entertainment.in.msn.com/bollywoodthisdecade/