[ns] help me with the dsr segmentation problem

2007-02-28 Thread sandeep v

hi. this is my tcl script to simulate for 3 nodes using dsr routing
protocol. it s givin as segmentation fault. but the same script works for
dsdv just by changin the routing protocol in the script pasted
below...please help me at the earliest as i ve lost a lot of time tryin to
solve this.

the terminal display when i run the tcl script is

[EMAIL PROTECTED] ns-allinone-2.30]# ns simple-dsr.tcl
num_nodes is set 3
INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
Segmentation fault
[EMAIL PROTECTED] ns-allinone-2.30]#

this is the tcl script

# Define options
set val(chan)   Channel/WirelessChannel;# channel type
set val(prop)   Propagation/TwoRayGround   ;# radio-propagation
model
set val(netif)  Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11 ;# MAC type
set val(ifq)Queue/DropTail/PriQueue;# interface queue type
set val(ll) LL ;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 3  ;# number of mobilenodes
set val(rp) DSR  ;# routing protocol
set val(x)  500;# X dimension of
topography
set val(y)  400;# Y dimension of
topography
set val(stop)   150;# time of simulation end

set ns[new Simulator]
set tracefd   [open simple-dsr.tr w]
set windowVsTime2 [open win.tr w]
set namtrace  [open simwrls.nam w]

$ns trace-all $tracefd
$ns use-newtrace
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo   [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)
set chan_1_ [new $val(chan)]
#
#  Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
$ns node-config -adhocRouting $val(rp) \
 -llType $val(ll) \
 -macType $val(mac) \
 -ifqType $val(ifq) \
 -ifqLen $val(ifqlen) \
 -antType $val(ant) \
 -propType $val(prop) \
 -phyType $val(netif) \
 #-channelType $val(chan) \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace ON \
 -macTrace OFF \
 -movementTrace ON\
 -channel $chan_1_

for {set i 0} {$i  $val(nn) } { incr i } {
set node_($i) [$ns node]
}

# Provide initial location of mobilenodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0

$node_(1) set X_ 490.0
$node_(1) set Y_ 285.0
$node_(1) set Z_ 0.0

$node_(2) set X_ 150.0
$node_(2) set Y_ 240.0
$node_(2) set Z_ 0.0

# Generation of movements
$ns at 10.0 $node_(0) setdest 250.0 250.0 3.0
$ns at 15.0 $node_(1) setdest 45.0 285.0 5.0
$ns at 110.0 $node_(0) setdest 480.0 300.0 5.0

# Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 10.0 $ftp start

# Printing the window size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file $now $cwnd
$ns at [expr $now+$time] plotWindow $tcpSource $file }
$ns at 10.1 plotWindow $tcp $windowVsTime2

# Define node initial position in nam
for {set i 0} {$i  $val(nn)} { incr i } {
# 30 defines the node size for nam
$ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i  $val(nn) } { incr i } {
$ns at $val(stop) $node_($i) reset;
}

# ending nam and the simulation
$ns at $val(stop) $ns nam-end-wireless $val(stop)
$ns at $val(stop) stop
$ns at 150.01 puts \end simulation\ ; $ns halt
proc stop {} {
global ns tracefd namtrace
$ns flush-trace
close $tracefd
close $namtrace
}

$ns run


[ns] Please Help for invalid command Agent

2007-02-28 Thread Paks


Hi all,

I am working on video multicast stream. I downloaded the
EvalVid version used for NS. In that they have created
new agent called myUDP agent. I follwed all the
steps given in 

http://hpds.ee.ncku.edu.tw/~smallko/ns2/Evalvid_in_NS2.htm

I made the relevant changes in the packet.h and
Makefile etc. when I compiled the ns again the error was:

--

trace/trace.cc: In static member function `static int
Trace::get_seqno(Packet*)'
:
trace/trace.cc:206: error: `PT_XCP' undeclared (first use this function)
trace/trace.cc:206: error: (Each undeclared identifier is reported only once
for
 each function it appears in.)
trace/trace.cc: In member function `virtual void DequeTrace::recv(Packet*,
Handl
er*)':
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 6)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 6)
make: *** [trace/trace.o] Error 1

--

( but i think this isn't main problem )

And when I run the file be.tcl which is
given in the link only the error was: 

--

invalid command name Agent/myUDP
while executing
Agent/myUDP create _o82 
invoked from within
catch $className create $o $args msg
(procedure new line 3)
invoked from within
new Agent/myUDP
invoked from within
set udp1 [new Agent/myUDP]
(file be.tcl line 24)

--

Please help me regarding this. 
thanks in advance,
regards,

Paks

-- 
View this message in context: 
http://www.nabble.com/Please-Help-for-%22invalid-command-Agent%22-tf3307726.html#a9200745
Sent from the ns-users mailing list archive at Nabble.com.



[ns] please help to generate xgraph

2007-02-28 Thread sandeep v

how do i generate xgraph from the trace file generated by this dsr code?



# Define options
set val(chan)   Channel/WirelessChannel;# channel type
set val(prop)   Propagation/TwoRayGround   ;# radio-propagation
model
set val(netif)  Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11 ;# MAC type
set val(ifq)CMUPriQueue;# interface queue type
set val(ll) LL ;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 3  ;# number of mobilenodes
set val(rp) DSR  ;# routing protocol
set val(x)  500;# X dimension of
topography
set val(y)  400;# Y dimension of
topography
set val(stop)   150;# time of simulation end

set ns[new Simulator]
set tracefd   [open sandeep.tr w]
set windowVsTime2 [open praveen.tr w]
set namtrace  [open jagdish.nam w]

$ns trace-all $tracefd
$ns use-newtrace
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo   [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)
set chan_1_ [new $val(chan)]
#
#  Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
$ns node-config -adhocRouting $val(rp) \
 -llType $val(ll) \
 -macType $val(mac) \
 -ifqType $val(ifq) \
 -ifqLen $val(ifqlen) \
 -antType $val(ant) \
 -propType $val(prop) \
 -phyType $val(netif) \
 #-channelType $val(chan) \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace ON \
 -macTrace ON \
 -movementTrace ON\
 -channel $chan_1_

for {set i 0} {$i  $val(nn) } { incr i } {
set node_($i) [$ns node]
}

# Provide initial location of mobilenodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0

$node_(1) set X_ 490.0
$node_(1) set Y_ 285.0
$node_(1) set Z_ 0.0

$node_(2) set X_ 150.0
$node_(2) set Y_ 240.0
$node_(2) set Z_ 0.0

# Generation of movements
$ns at 10.0 $node_(0) setdest 250.0 250.0 3.0
$ns at 15.0 $node_(1) setdest 45.0 285.0 5.0
$ns at 110.0 $node_(0) setdest 480.0 300.0 5.0

# Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 10.0 $ftp start

# Printing the window size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file $now $cwnd
$ns at [expr $now+$time] plotWindow $tcpSource $file }
$ns at 10.1 plotWindow $tcp $windowVsTime2

# Define node initial position in nam
for {set i 0} {$i  $val(nn)} { incr i } {
# 30 defines the node size for nam
$ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i  $val(nn) } { incr i } {
$ns at $val(stop) $node_($i) reset;
}

# ending nam and the simulation
$ns at $val(stop) $ns nam-end-wireless $val(stop)
$ns at $val(stop) stop
$ns at 150.01 puts \end simulation\ ; $ns halt
proc stop {} {
global ns tracefd namtrace
$ns flush-trace
close $tracefd
close $namtrace
exec nam jagdish.nam 
}

$ns run


Re: [ns] Disable ARP

2007-02-28 Thread Ahmad Khayyat

Never mind.
The two lines work perfectly. They just happened to trigger another
problem, which is taken care of now :)

On Tue, 27 Feb 2007 18:27:37 -0500
Ahmad Khayyat [EMAIL PROTECTED] wrote:

 What is the easiest way to disable the use of the ARP protocol?
 I guess the IP address corresponds to the MAC address in ns-2, doesn't
 it? So how do I make the LL/ARP modules use it immediately without
 using ARP?
 
 I tried adding the following two lines at the top of
 ARPTable::arpresolve(nsaddr_t dst, Packet *p, LL *ll)
 
 mac_-hdr_dst((char*) HDR_MAC(p), dst);
 return 0;
 
 but that caused strange behaviour on rare occasions, where a packet
 suddenly would appear in another far node. Playing with ARP doesn't
 explain the problem for me, but somehow removing those two lines
 gets rid of the strange behaviour. So, what is a proper way of
 disabling ARP?
 
 Thanks..
 Ahmad



[ns] Multiple interfaces!!!!! Need Help!!!

2007-02-28 Thread Hiba Alame

Hi to all,

I am trying to implemt a single node with two interfaces of different
technologies: Bluetooth and WiFi. I am a new comer to NS2 and I am finding
itquite overwhelming so does anyone have an idea on how I should tackle the
problem of multile interfaces given that I use available modules for Bluetooth
and WiFi?

Also!! Does anyone know about UCBT (an available Bluetooth module) it doesn't
have any kind of documentation) so I would appreciate any help I can get on how
to use it and any documentation that you have available for it.
On the other hand, what about BlueHoc, it runs on ns2.1b7a an old version of
Ns2, but could be run on a recent version such as ns2.28 or 2,29 or 2.30, has
anyone tried that before?? Did you face any problems??

Thank you for your help I really appreciate it and need it!!





Re: [ns] tk8.4.11 make failed!

2007-02-28 Thread harpreet

hi
i am also getting same problem while making tk8.4.14 file in tk3d.c file. i 
seached previous tread. there is one similar problem in 2005 . that person 
gives solution to load X-development environment. because this requires 
C-development lib.
i haven't tried this yet. so u can try this solution. 
reply if that works for you


  
On Mon, 27 Feb 2006 20:36:44 -, Kevin.McGrath wrote
 Help ... please
[snip]
 For problems with Tcl/Tk see http://www.scriptics.com
 http://www.scriptics.com/

First: have you searched http://www.tcl.tk/ for help?

Second: maybe we could help you if you post the parameters and output of
./configure

--
 Emanuele  Vecchio 
Happy Debian GNU/Linux User
: emanu at linux.it ::


harpreet singh


[ns] how to generate xgraph from tracefile

2007-02-28 Thread harpreet

  
hi
i generated the tracefiles from project. i want to how to get the xgraph from 
tracefile.
please help me in getting xgraphs.
thanks in advance


harpreet singh


[ns] Please Help for invalid command Agent by Paks

2007-02-28 Thread Paks


Hi all,

I am working on video multicast stream. I downloaded the
EvalVid version used for NS. In that they have created
new agent called myUDP agent. I follwed all the
steps given in 

http://hpds.ee.ncku.edu.tw/~smallko/ns2/Evalvid_in_NS2.htm

I made the relevant changes in the packet.h and
Makefile etc. when I compiled the ns again the error was:

--

trace/trace.cc: In static member function `static int
Trace::get_seqno(Packet*)'
:
trace/trace.cc:206: error: `PT_XCP' undeclared (first use this function)
trace/trace.cc:206: error: (Each undeclared identifier is reported only once
for
 each function it appears in.)
trace/trace.cc: In member function `virtual void DequeTrace::recv(Packet*,
Handl
er*)':
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:567: warning: int format, nsaddr_t arg (arg 6)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 5)
trace/trace.cc:586: warning: int format, nsaddr_t arg (arg 6)
make: *** [trace/trace.o] Error 1

--

( but i think this isn't main problem )

And when I run the file be.tcl which is
given in the link only the error was: 

--

invalid command name Agent/myUDP
while executing
Agent/myUDP create _o82 
invoked from within
catch $className create $o $args msg
(procedure new line 3)
invoked from within
new Agent/myUDP
invoked from within
set udp1 [new Agent/myUDP]
(file be.tcl line 24)

--

Please help me regarding this. 
thanks in advance,
regards,

Paks
-- 
View this message in context: 
http://www.nabble.com/Please-Help-for-%22invalid-command-Agent%22-by-Paks-tf3309051.html#a9204496
Sent from the ns-users mailing list archive at Nabble.com.



[ns] How to differentiate Voice,data and Video Traffics?

2007-02-28 Thread taraka praveen


Hi friends,

 I am beginner to NS2.I have one doubt regarding
Traffic.
I find mostly CBR traffic from application in the NS
examples.

If i want to Differentiate Voice,Data and Video how
the Traffic pattern will change ?

Please give me the solution for differentiating
Data,Voice and Video in NS simulations.

Thanks in advance,
Tarakapraveen Uppalapati



__
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/



[ns] how to use perl/awk

2007-02-28 Thread [EMAIL PROTECTED]

Hi all
I am beginner to NS2, I have found some perl and awk scripts
to extract data from trace file but I don't know how use it, ( must include the 
code into tcl script, must run it
separately ?) please help me

Thanks and best regards
G


--
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada28eb07





[ns] Where we find the link between .tcl ,.cc and .h files ?

2007-02-28 Thread taraka praveen


Hi friends,

 I have one regarding the linking of .cc to tcl files.

1)Please help in which part of the tcl code we are
getting the .cc files link.

2) I feel link is there.But one more doubt i got few
tcl   files from net and i was able to run those
without any .cc files support.How its possible ?

please give me the solution

Thanks in advance,
Tarakapraveen Uppalapati Goud



__
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/



[ns] Segmentation fault with a highly mobile network ??

2007-02-28 Thread Nour Brinis

Hi all,

 I am trying to carry out some simulations using the ns2 simulator.
I have installed the ns2 2.28 and I am using DSR as ad hoc routing protocol.

The problem is that with a highly mobile network ( it depends on the pause
time fixed when generating a mobility script: setdest -nn 100 -p (pause
time ??) ...), a segmentation fault is generated.
I have to run consistent scenario: high mobility and long simulation time.
Can you please help me about this problem?

Thanks in advance!!


[ns] getting a pointer to the mobile node from mac

2007-02-28 Thread Francisco Muñiz

-- Forwarded message --
From: Francisco Muñiz [EMAIL PROTECTED]
Date: 28-feb-2007 14:33
Subject: getting a pointer to the mobile node from mac
To: ns-users@isi.edu

Hello all.

I want to get the geographical location of my mobile node from smac. Thats
why I want to get a pointer to the mobile node but I don´t know how to.
Can anyone help me?

Thank you.


-- 
Francisco Javier Muñiz Rodriguez
Fono: 9 9198547
MSN : [EMAIL PROTECTED]


[ns] getting a pointer to the mobile node from mac

2007-02-28 Thread Francisco Muñiz

Hello all.

I want to get the geographical location of my mobile node from smac. Thats
why I want to get a pointer to the mobile node but I don´t know how to.
Can anyone help me?

Thank you.


[ns] C++ codes for Wireless nodes

2007-02-28 Thread Supratik Singha

Sir,
Please tell me the files and the C++ codes with which the wireless
nodeshave been defined / created.

For example, in the following code from the file wireless1.tcl

$ns_ node-config -adhocRouting $val(adhocRouting) \
 -llType $val(ll) \
 -macType $val(mac) \
 -ifqType $val(ifq) \
 -ifqLen $val(ifqlen) \
 -antType $val(ant) \
 -propType $val(prop) \
 -phyType $val(netif) \
 -channelType $val(chan) \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace OFF \
 -macTrace OFF


i want to know where the C++ codes have been written with which the above
code deals.
Please help.


Re: [ns] C++ codes for Wireless nodes

2007-02-28 Thread Scott Ricketts

The directory: ~ns/mobile holds the relevant wireless support.

The way I generally find C++ implementations of Otcl objects is grep
- a linux tool for searching file text. For example, if you are
looking for the implementation of Agent/UDP, try

grep -R -I Agent/UDP ~ns/*

-Scott

On 2/28/07, Supratik Singha [EMAIL PROTECTED] wrote:

 Sir,
 Please tell me the files and the C++ codes with which the wireless
 nodeshave been defined / created.

 For example, in the following code from the file wireless1.tcl

 $ns_ node-config -adhocRouting $val(adhocRouting) \
  -llType $val(ll) \
  -macType $val(mac) \
  -ifqType $val(ifq) \
  -ifqLen $val(ifqlen) \
  -antType $val(ant) \
  -propType $val(prop) \
  -phyType $val(netif) \
  -channelType $val(chan) \
  -topoInstance $topo \
  -agentTrace ON \
  -routerTrace OFF \
  -macTrace OFF


 i want to know where the C++ codes have been written with which the above
 code deals.
 Please help.




[ns] combined wireless and wired nodes in the same simulated topolgy

2007-02-28 Thread Ramzi Tka

Hi all,
Is it possible to simulate a wired-cum-wireless network composed by several
wireless nodes that run a given routing protocol and several wired nodes
partially meshed ( not all them are connected to the BS) . Could these wired
nodes use any routing protocol, or there is some contraints or problems for.
I have tried with the ns-2  basic LS protocol . It doesn't function.
The topology is the followin

   M1N2
   *   *
 *  *
   M2   BS * * * * * N1 * N4
 *   *
*  *
M3N3


I activated LS for bstation, sinkNode, sinkNode1, sinkNode2 and sinkNode3
and assigned the relative cost for their links.
-
$ns rtproto LS  $bstation $sinkNode $sinkNode1 $sinkNode2 $sinkNode3

  $ns cost $bstation $sinkNode 1
  $ns cost $sinkNode $bstation 1

  $ns cost $sinkNode $sinkNode1 1
  $ns cost $sinkNode1 $sinkNode  1

  $ns cost $sinkNode $sinkNode2 2
  $ns cost $sinkNode2 $sinkNode 2

  $ns cost $sinkNode1 $sinkNode3 1
  $ns cost $sinkNode3 $sinkNode1 1

  $ns cost $sinkNode2 $sinkNode3 2
  $ns cost $sinkNode3 $sinkNode2 2
-

and I used hierarchical routing adressing :
---
$ns node-config -addressType hierarchical
AddrParams set domain_num_ 2;# domain number
lappend cluster_num 1 1 ;# cluster number
for each domain
AddrParams set cluster_num_ $cluster_num
#lappend eilastlevel 1 [expr ($nb_mn+1)];# number of nodes
for each cluster (1 for sink and one for mobile nodes + base station
lappend eilastlevel 4 [expr ($nb_mn+1)] ;# number of nodes
for each cluster (4 for sink and one for mobile nodes + base station
AddrParams set nodes_num_ $eilastlevel

#creates the sink node in first addressing space.
set sinkNode [$ns node 0.0.0]
set sinkNode1 [$ns node 0.0.1]
set sinkNode2 [$ns node 0.0.2]
set sinkNode3 [$ns node 0.0.3]
set sinkNode4 [$ns node 0.0.4]

for {set i 0} {$i  $nb_mn} {incr i} {
set wl_node_($i) [$ns node 1.0.[expr $i + 1]]   ;# create the node
with given @.
$wl_node_($i) random-motion 0   ;# disable random
motion
$wl_node_($i) base-station [AddrParams addr2id [$bstation
node-addr]]
}
---

The error message was :
--
wrong # args: should be set varName ?newValue?
while executing
set nodeslist _o60 _o15 _o23 _o31 _o39
(eval body line 1)
invoked from within
eval set nodeslist $args
(procedure Agent/rtProto/LS line 5)
(Agent/rtProto/LS init-all line 5)
invoked from within
Agent/rtProto/LS init-all _o60 _o15 _o23 _o31 _o39
(eval body line 1)
invoked from within
eval Agent/rtProto/$proto init-all $rtprotos_($proto)
(foreach body line 2)
invoked from within
foreach proto [array names rtprotos_] {
eval Agent/rtProto/$proto init-all $rtprotos_($proto)
}
invoked from within
if [info exists rtprotos_] {
foreach proto [array names rtprotos_] {
eval Agent/rtProto/$proto init-all $rtprotos_($proto)
}
} else {
Agent/rtProto/St...
(procedure _o1899 line 3)
(RouteLogic configure line 3)
invoked from within
[$self get-routelogic] configure
(procedure _o3 line 5)
(Simulator run line 5)
invoked from within
$ns run


Could someone give me some idea, plz
best regards
Ramzi


[ns] debuggin c++ in ns

2007-02-28 Thread pankaj chand

hi can anyone please tell how to debug the c++ source code in ns. after 
adding the -g and several other statements in the makefile.in and install 
file, im able to debug but the debugger cannot find the source code, and 
hence cannot show me the line of code which is raising the error (bug).
i am calling the debugger on the ns binary executable in the 
ns-allinone2.29/bin folder.
how do i make the debugger, GDB or DDD find the source code of the ns 
program so as to find the exact line of code that is generating the bug.

thanks in advance.
pankaj chand
mail address: [EMAIL PROTECTED]

_
Airtel Song Catcher. Get your Hello Tunes instantly 
http://www.airtel.in/songcatcher/SONG_CATCHER.html