[ns] Regarding angle traversal

2009-11-13 Thread gayathri devi

Hai Everybody,

  I don't know how to calculate and maintain the cumulative angle 
traversed by the packet to reach destination. Please guide me in computing this 
calculation.



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/


[ns] Regarding angle traversal

2009-11-13 Thread gayathri devi

Hai Everybody,

 I don't know the computation of angle traversed by the packet 
to reach the destination. Please guide me in computing this angle traversal.

Thank you,
Gayathri.



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/


[ns] [bug] please help about NOAH routing protocol !!!!!!

2009-11-13 Thread Hamid

[Bug Report]

-
Category:  Other
Package:   ns ns-2.30
OS:Suse-10.3
Environment Variables:
LD_LIBRARY_PATH=
TCL_LIBRARY=
TK_LIBRARY=

-
Description:

Description of Problem:
I'm working with Mobile IP and using ns-2.30 , I´ve already
modified ns2.30, following this step by step:

Makefile.in   add noah/noah.o \ to OBJ_CC and tcl/mobility/noah.tcl \ to
NS_TCL_LIB

noah/noah.{h,cc}  add noah.h and noah.cc to a new subdirectory noah/

tcl/mobility/noah.tcladd noah.tcl to tcl/mobility/

tcl/lib/ns-lib.tcl.hline 191: add source ../mobility/noah.tcl

line 603ff: add

NOAH {
set ragent [$self create-noah-agent $node]
}

line 768ff: add

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 demux]
}
$node addr $addr
$node set ragent_ $ragent
return $ragent
}

while I am trying to run the ns it will display that :
ns:[code omitted because of length]
:invalid command name Agent/NOAH
  while executing
Agent/NOAH set sport_   o

this is what i got after running the ns.
please help.

Thanks,
 Hamid


How Easily Reproducible:
(e.g. every time, intermittent, once only, etc.)


Steps to Reproduce:
(describe the minimal set of steps necessary to trigger the bug)
1. 
2. 
3. 


Actual Results:
(describe what the application did after performing the above steps)


Expected Results:
(describe what the application should have done, were the bug not present)


Additional Information:
(the following infomation is helpful to debug:
 1. simulation script, detailed output files, packet trace
 2. patch file if you modify some source code
 3. a backtrace from gdb if you get a segment fault
 If they are big files, PLEASE put them in your web space and
 include the URL here.)




[ns] segmentation fault(core dumped) when making

2009-11-13 Thread jiantao Zhou

Hi
*I have installed the ns2 2.31 all in one version on cygwin in Windows Vista
environment.  I've added some modules to ns for my designed routing.Therer
is no error  in making however,when I run the below example, the ns2 will
segmentation fault (core dumped).I use GDB to find where the problem is,and
the GDB gives the information:
*Program received signal SIGSEGV, Segmentation fault.
0x0046370f in Queue::recv (this=0x39ac458, p=0x39d0a40) at
queue/queue.cc:137
137 downtarget_-recv(p, qh_);
Then i use bt to find the detail,it shows:
(gdb) bt
#0  0x0046370f in Queue::recv (this=0x39ac458, p=0x39d0a40)
at queue/queue.cc:137
#1  0x006a7514 in Connector::send (this=0x39af360, p=0x39d0a40, h=0x0)
at ./common/connector.h:56
#2  0x0040dd9d in Trace::recv (this=0x39af360, p=0x39d0a40, h=0x0)
at trace/trace.cc:432
#3  0x006a7514 in Connector::send (this=0x39ae708, p=0x39d0a40, h=0x0)
at ./common/connector.h:56
#4  0x0040c611 in Connector::recv (this=0x39ae708, p=0x39d0a40, h=0x0)
at common/connector.cc:103
#5  0x0040f189 in Classifier::recv (this=0x3999cb0, p=0x39d0a40, h=0x0)
at classifier/classifier.cc:151
#6  0x0041e81b in UdpAgent::sendmsg (this=0x39c5418, nbytes=1000, data=0x0,
flags=0x0) at apps/udp.cc:107
#7  0x006a639a in UdpAgent::sendmsg (this=0x39c5418, nbytes=1000, flags=0x0)
at apps/udp.h:61
#8  0x00414bad in Application::send (this=0x39c5ce8, nbytes=1000)
at apps/app.cc:111
#9  0x0041522c in TrafficGenerator::timeout (this=0x39c5ce8)
at tools/trafgen.cc:74
#10 0x004169a6 in CBR_Traffic::start (this=0x39c5ce8)
at tools/cbr_traffic.cc:101
#11 0x004149b8 in Application::command (this=0x39c5ce8, argc=2,
argv=0x22a22c)

My queue.cc is:
void Queue::recv(Packet* p, Handler*)
{
 double now = Scheduler::instance().clock();
 enque(p);
 //printQueue();
 if (!blocked_) {
  /*
   * We're not blocked.  Get a packet and send it on.
   * We perform an extra check because the queue
   * might drop the packet even if it was
   * previously empty!  (e.g., RED can do this.)
   */
  p = deque();
  if (p != 0) {
   utilUpdate(last_change_, now, blocked_);
   last_change_ = now;
   blocked_ = 1;
   downtarget_-recv(p, qh_);//here I made a change for my routing protocol
  }
 }
}

Thank you very much in advance !


set ns [new Simulator]
$ns color 1 Blue
$ns color 2 Red
set nf [open out.nam w]
$ns namtrace-all $nf
set nd [open out.tr w]
$ns trace-all $nd
proc finish {} {
global ns nf nd
$ns flush-trace
close $nf
close $nd
exec nam out.nam 
exit 0
}

set s1 [$ns node]
set s2 [$ns node]

set r [$ns node]

set d [$ns node]
$ns duplex-link $s1 $r 2Mb 10ms DropTail
$ns duplex-link $s2 $r 2Mb 10ms DropTail
$ns duplex-link $r $d 1.7Mb 20ms DropTail
$ns queue-limit $r $d 10

$ns duplex-link-op $s1 $r orient right-down
$ns duplex-link-op $s2 $r orient right-up
$ns duplex-link-op $r $d orient right
$ns duplex-link-op $r $d queuePos 0.5
set tcp [new Agent/TCP]
$ns attach-agent $s1 $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $d $sink
$ns connect $tcp $sink
$tcp set fid_ 1

set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ftp set type_ FTP

set udp [new Agent/UDP]
$ns attach-agent $s2 $udp
set null [new Agent/Null]
$ns attach-agent $d $null
$ns connect $udp $null
$udp set fid_ 2

set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set type_ CBR
$cbr set packet_size_ 1000
$cbr set rate_ 1mb
$cbr set random_ false

$ns at 0.1 $cbr start
$ns at 1.0 $ftp start
$ns at 4.0 $ftp stop
$ns at 4.5 $cbr stop
$ns at 4.5 $ns detach-agent $s1 $tcp ; $ns detach-agent $d $sink
$ns at 5.0 finish
$ns run


[ns] tcp/cbr traffice generator

2009-11-13 Thread Thien Long

Hi everyone,

Please help me! Who has tcp/cbr traffice generator  please send it to me. I 
need so much.

Thanks in advance!

 ==
Võ Quốc Trình



  Thiết kế ngay một Pingbox độc đáo cho riêng bạn! Tạo một nơi để chat trên 
blog là chuyện nhỏ. http://vn.messenger.yahoo.com/pingbox/