[ns] How to do GMPLS simulation in ns-2 ???

2009-03-24 Thread lukman_hanif

Hi,
Does anybody knows on how to do GMPLS simulation in ns-2 ???



  


[ns] how to get the coordinates of the nodes in evrey period of time

2009-03-24 Thread anas

Dear users

how to get the coordinates of the nodes in evrey period of time

Regards

Anas


[ns] RED parameters in Misra Hollot paper

2009-03-24 Thread Estuans Interius

Hi, I am new using ns-2 simulator. To be sure I want to run RED in ns-2 to
see the same results of (Hollot, Misra). Is there any written .tcl code for
this paper. Moreover, if I want to introduce 40 http session in to the
network what should I do? I am sorry for these basic questions

best
hakki


Re: [ns] Multiple connections to a single agent

2009-03-24 Thread hakki


Hi, I need a help about RED in ns-2. I want to see the results in Hollot
Misra Infocom paper. In their paper, they introduced  60 TCP flows and 180
http session. I am so new about ns-2 so I don't know how should I introduce
these sources, especially http session.

best 
hakki

Pedro Estrela wrote:
 
 
 The problem is that the packets that you are sending to A3 have an
 incorrect
 port address. 
 
 When you use 
$ns connect $a1 $a2
 then automatically all normal control packets sent by a1 have the
 destination port of a2;
 
 as a1 is not connected to a3 in TCL, you must set the port by hand in C++,
 as NS will not do this for you, eg:
 
 void myAgent::recv(Packet* p, Handler *h)
 {
   hdr_ip*iph  = hdr_ip::access(p);
   hdr_cmn   *ch   = hdr_cmn::access(p);
 
   ...
 
   iph-saddr() = addr();  // (set my IP address)
   iph-sport() = port();  // (set my source port)
   iph-daddr() = nextHop_iaddr; // iaddr of n3
 iph-dport() = nextHop_iaddr; // port of a3
 
 regarding the iaddr comment: check
 http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html
 
 In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all
 possible conversions of each form, using the procs handle2iaddr,
 handle2haddr, handle2id, etc.
 
 
 
 you could also have debug this problem by:
   - redefining the no-slot handler to invoke the run-time TCL
 debugger;
   - use the mash inspector to find exactly who are _o153, _o158, etc
 (http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html)
 
 If this helps you, please contribute the description of the problem and
 the
 solution, in your own words, to the NS2 wiki.
 
 Pedro Vale Estrela
 
 
 
 -Original Message-
 From: ns-users-boun...@isi.edu [mailto:ns-users-boun...@isi.edu] On
 Behalf
 Of Brad Montgomery
 Sent: segunda-feira, 3 de Julho de 2006 19:25
 To: ns-users@isi.edu
 Subject: Re: [ns] Multiple connections to a single agent
 
 
 I'm not sure I understand, and perhaps I've not adequately described what
 I'm trying to do, so I'll try again using a semi-hypothetical scenario:
 (Please keep in mind I'm new to ns!)
 
 Suppose I've got the following topology:
 
 N1 - N2 - N3
 
 And three different agents, (A1,A2,A3) which have all been implemented
 differently in C++.  The basic idea is that I want these agents to
 automatically communicate with each other...
 
 In C++ I've written an A1::command() function that will 'send' sends an
 IP
 packet to the A2 agent.  When the A2 agent receives this packet, it then
 sends a packet back to A1, which then gets returned to A2 (basically a 3-
 way
 handshake).  A2 should then automatically send another packet to the A3
 agent by creating a packet, and inserting N3's address in the IP header.
 (I'm assuming all of my agents and nodes know about the topology)
 
 In TCL I've done this:
 
 set n1 [$ns node]
 set n2 [$ns node]
 set n3 [$ns node]
 
 set a1 [new Agent/A1]
 set a2 [new Agent/A2]
 set a3 [new Agent/A3]
 
 $ns attach-agent $n1 $a1
 $ns attach-agent $n2 $a2
 $ns attach-agent $n3 $a3
 
 $ns connect $a1 $a2
 #$ns connect $a2 $a3 ;# if I do this, the handshake doesn't work
 
 $ns at 0.0 $a1 send
 
 
 When I run this, ns gives me this error:
 
 --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
 _o158: no target for slot 3
 _o158 type: Classifier/Port
 content dump:
 classifier _o158
 0 offset
 0 shift
 2147483647 mask
 1 slots
 slot 0: _o153 (Agent/A3)
 -- Finished standard no-slot{} default handler --
 
 
 Basically I want A3 to look at any or all packets send to N3.  How can I
 force this?
 
 I'm using ns-2.29 on Mac OS X 10.4.7.
 
 Thanks in advance!
 
 Brad
 
 
 On 7/2/06 6:10 PM, Mark Shifrin m_shif...@yahoo.com wrote:
 
  no problem with tcp
  you can do attach agent as many time as you want to a single node.
  you must first define it as tcp-source. and then to choose the
 application
  which runs over this
  tcp, for example i did it with FTP. moreover you can do it for n,
 within
 a
  loop
 
  --- Brad Montgomery bkmnt...@memphis.edu wrote:
 
 
  Hello All,
 
  I'm wondering if it's possible to have a single Agent connected to 2
 or
 more
  other Agents. I have a topology similar to this:
 
N2
|
  N0 -- N1 -- N3 -- N4
 
  I have an agents A0, A2, A3 connected to N0, N2, N3 respectively, and
 I
  would like A0 to send a packet to A2, which would then in turn send a
 packet
  to A3.  Is this possible?
 
  From reading the mailing list archives, it seems like this may not be
  possible, so my second question would be this:
 
  Is it possible to attach an agent to a Node, and force that agent's
 recv
  function to get executed for every packet that passes through that
 node?
  For example: Could N2 send a packet to N4, so that A3's recv 

Re: [ns] how to get the coordinates of the nodes in evrey period of time

2009-03-24 Thread Mubashir Rehmani

Hi,

Try to use timers to get the coordinates of the nodes periodically. See ns2
manual for timers.

Regards
Mubashir Husain Rehmani

2009/3/24 anas saba717...@hotmail.com


 Dear users

 how to get the coordinates of the nodes in evrey period of time

 Regards

 Anas




-- 
Mubashir Husain Rehmani


[ns] Using mac 802.11e tkn with mac 802.11

2009-03-24 Thread Angelo Alifano

Hi all,
I have installed the TKN package on ns-2.31 and it is working perfectly.
I'm asking if it possible to use both mac, 802.11e and 802.11, in the same 
scenario to have a pair of node in EDCA mode and a pair of node in EDCF mode.
A scenario like this will works fine ?

# ==# 
Define options# 
==set 
val(chan)   Channel/WirelessChannel;# channel typeset val(prop) 
  Propagation/TwoRayGround   ;# radio-propagation modelset val(netif)   
   Phy/WirelessPhy;# network interface typeset val(mac)
Mac/802_11 ;# MAC typeset val(ifq)
Queue/DropTail/PriQueue;# interface queue typeset val(ll) LL
 ;# link layer typeset val(ant)
Antenna/OmniAntenna;# antenna modelset val(ifqlen) 50   
  ;# max packet in ifqset val(nn) 2 
 ;# number of mobilenodesset val(rp) NOAH   
;# routing protocol# 
==# Main 
Program# ==!
 ## Initialize Global Variables#set ns_  
[new Simulator]set tracefd [open scenario_802_11_2edca_2edcf.tr w]$ns_ 
trace-all $tracefd$ns_ use-newtrace# set up topography objectset topo   
[new Topography]$topo load_flatgrid 500 500Mac/802_11 set SlotTime_  
0.20;# 20usMac/802_11 set SIFS_  0.10;# 
10usMac/802_11 set PreambleLength_144 ;# 144 bitMac/802_11 set 
PLCPHeaderLength_  48  ;# 48 bitsMac/802_11 set PLCPDataRate_  
1.0e6   ;# 1MbpsMac/802_11 set dataRate_  11.0e6  ;# 
11MbpsMac/802_11 set basicRate_ 1.0e6   ;# 1MbpsMac/802_11 set 
CWMin_ 31Mac/802_11 set CWMax_ 1023 
 Mac/802_11 set RTSThreshold_  4096Mac/802_11 set ShortRetryLimit_   
7Mac/802_11 set LongRetryLimit_4Mac/802_11 set MaxSDUSize_2132## 
Create God#create-god 4##  Create the specified number of mobile!
 nodes [$val(nn)] and attach them#  to the channel. #  Here two nodes
 are created : node(0) and node(1)# configure node$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 OFF  for 
{set i 0} {$i  $val(nn) } {incr i} { set node_($i) [$ns_ node]  $node_($i) 
random-motion 0  ;# disable random motion}## Provide initial (X,Y, for now Z=0) 
co-ordinates for mobilenodes#$node_(0) set X_ 5.0$node_(0) set Y_ 2.0$node_(0) 
set Z_ 0.0$node_(1) set X_ 0.0$node_(1) set Y_ 35.0$node_(1) set Z_ 0.0# Setup 
traffic flow between nodes# CBR connections between node_(0) and node_(1)set 
agent [new Agent/UDP]$agent set class_ 2$agent set fid_ 3set sink [new 
Agent/Null]$ns_ attach-agent $node_(0) $agent$ns_ attach-agent $node_(1) 
$sink$ns_ connect $agent $sinkset cbr [new Application/Traffic/CBR] 
$cbr  se!
 t packetSize_ 160 $cbr  set random_ 0 $cbr  set rate_  
 64000$cbr attach-agent $agent$ns_ at 20.1 $cbr start$ns_ at 100 $cbr 
stopset agent1 [new Agent/UDP]$agent1 set class_ 2$agent1 set fid_ 4set sink1 
[new Agent/Null]$ns_ attach-agent $node_(1) $agent1$ns_ attach-agent $node_(0) 
$sink1$ns_ connect $agent1 $sink1set cbr1 [new Application/Traffic/CBR] 
$cbr1  set packetSize_ 160 $cbr1  set random_ 0 $cbr1  set 
rate_   64000$cbr1 attach-agent $agent1$ns_ at 20.0 $cbr1 start$ns_ at 
100 $cbr1 stop## Tell nodes when the simulation ends#for {set i 0} {$i  
$val(nn) } {incr i} {$ns_ at 100.1 $node_($i) reset;}set val(chan)
   Channel/WirelessChannel;# channel typeset val(prop)   
Propagation/TwoRayGround   ;# radio-propagation modelset val(netif)  
Phy/WirelessPhy;# network interface typeset val(mac)
Mac/802_11e ;# MAC typeset val(ifq)Qu!
 eue/DTail/PriQ;# interface queue typeset val(ll) LL   
  ;# link layer typeset val(ant)
Antenna/OmniAntenna;# antenna modelset val(ifqlen) 50   
  ;# max packet in ifqset val(nn) 2 
 ;# number of mobilenodesset val(rp) NOAH   
;# routing protocolMac/802_11e set SlotTime_  0.20;# 
20usMac/802_11e set SIFS_  0.10;# 10usMac/802_11e set 
PreambleLength_144 ;# 144 bitMac/802_11e set PLCPHeaderLength_  
48  ;# 48 

[ns] New protocol added..but error in running tcl script

2009-03-24 Thread Kiraneet sharma

Hello everyone...

I have added a new protocol in ns2,which is an extension of aodv.
After making the required changes in all the files,running ./configure and
make goes well...

But if I run a tcl script using that protocol it shows an error :

(_o14 cmd line 1)
invoked from within
_o14 cmd addr
invoked from within
catch $self cmd $args ret
invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
(procedure _o14 line 2)
(SplitObject unknown line 2)
invoked from within
_o14 addr
(eval body line 1)
invoked from within
eval $node addr $args
(default arm line 2)
invoked from within
switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 $node start-dsr
}
AODV {
set ragent [$self cre...
(procedure _o3 line 11)
(Simulator create-wireless-node line 11)
invoked from within
_o3 create-wireless-node
(eval body line 1)
invoked from within
eval $self create-wireless-node $args
(procedure _o3 line 23)
(Simulator node line 23)
invoked from within
$ns node
(for body line 2)
invoked from within
for {set i 0} {$i  $val(nn) } { incr i } {
set node_($i) [$ns node]
}


I have checked the case sensitivity of protocol name too...

Any solution ?


[ns] Re : New protocol added..but error in running tcl script

2009-03-24 Thread Nadine Chen

hi,
to solve this problem, after make, you should execute make install , and your 
protocol will work fine.
hope this helps.

--- En date de : Mar 24.3.09, Kiraneet sharma kiraneet.sha...@gmail.com a 
écrit :

De: Kiraneet sharma kiraneet.sha...@gmail.com
Objet: [ns] New protocol added..but error in running tcl script
À: ns-users@ISI.EDU
Date: Mardi 24 Mars 2009, 11h52


Hello everyone...

I have added a new protocol in ns2,which is an extension of aodv.
After making the required changes in all the files,running ./configure and
make goes well...

But if I run a tcl script using that protocol it shows an error :

(_o14 cmd line 1)
    invoked from within
_o14 cmd addr
    invoked from within
catch $self cmd $args ret
    invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
    (procedure _o14 line 2)
    (SplitObject unknown line 2)
    invoked from within
_o14 addr
    (eval body line 1)
    invoked from within
eval $node addr $args
    (default arm line 2)
    invoked from within
switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 $node start-dsr
}
AODV {
set ragent [$self cre...
    (procedure _o3 line 11)
    (Simulator create-wireless-node line 11)
    invoked from within
_o3 create-wireless-node
    (eval body line 1)
    invoked from within
eval $self create-wireless-node $args
    (procedure _o3 line 23)
    (Simulator node line 23)
    invoked from within
$ns node
    (for body line 2)
    invoked from within
for {set i 0} {$i  $val(nn) } { incr i } {
        set node_($i) [$ns node]
    }


I have checked the case sensitivity of protocol name too...

Any solution ?



  


[ns] ns2-making changes in aodv

2009-03-24 Thread Kiran patel

respected sir

i am work on enhanced aodv through fixed expire time in manet.
but i  can not understand  how to find out shorest path in aodv node and how
can calculate distance between to node...and where i change my code for
that...
plz sir give me some code for that in ns2 so i implement it...


thank you sir


 regard
kiran


[ns] ns2 aodv expire time

2009-03-24 Thread Kiran patel

respected sir,
i am work on aodv modification in routing table update through fixed expired
time ..
so i can not understand where i change my aodv.cc code and where i keep
fixed expire time in this code..
plz sir give me some reply..

thank u sir
regard
kiran


[ns] UMTS Code EURANE Code - Class Simulator Error

2009-03-24 Thread Syed Faraz Hasan

Hi Everyone!

With Pats help I managed patching EURANE in NS-2.30 (OS: Linux). I am now 
trying to run test_tcp.tcl available on EURANE website. It is not executing 
correctly. I tried running each command of the program one by one to see wheres 
the error. Everything is OK till I reach...

set rnc [$ns create-Umtsnode]

which gives error:
Error when calling class Simulator: create-Umtsnode

Rest of the statements of the program are running OK (by that I mean there are 
no errors when I execute them)

Can some one help me at this please?
I am in desperate need of help!!!

Faraz



[ns] RAL route acquisition latency

2009-03-24 Thread sarym binome


 hello everybody
 does anybody know how to calculate the RAL route acquisition latency ??
 with awk 
 best regards

_
Découvrez tout ce que Windows Live a à vous apporter !
http://www.microsoft.com/windows/windowslive/


[ns] Help regarding absurd memory usage

2009-03-24 Thread fhg07

I am simulating a protocol which I developed, and I wanted the simulation
to end only when all my nodes are dead. Well, that is not really that fast
to happen, and before I reach that point my memory ends and I get a
bac_alloc error message.

And here is the thing: I do alloc lots of packets with allocpkt, and I
also always manage to free them with Packet::free(Packet *), but even when
I free them, the memory usage don't even change ! And I am not
overreacting when I say this, I made some experiments, and the average
memory used when freeing all packet was exactly the same of when I did the
same simulation withou freeing them.


What do I need to do when I intend to have huge simulations, with like
15000 packets flying in the air? Using Packet::free didn't solve my
problem. I even tried editing this function and inserting free(pkt); in
its end, but it was in vain.


Can someone please help me?


Thanks,

-- 
Fernando Henrique Gielow - UFPR - NR2
Computer Science undergraduate student.



[ns] [bug] zrp impementaion in ns-2

2009-03-24 Thread anshul

[Bug Report]

-
Category:  Other
Package:   ns ns-2.31
OS:fedora core
Environment Variables:
LD_LIBRARY_PATH=
TCL_LIBRARY=
TK_LIBRARY=


-
Description:

while compliling zrp on ns-2 i am getting the following error

zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member 
‘compute_routes’ 
zrp/zrp_table.h: In member function ‘int RoutingTable::next_hop_to(nsaddr_t)’:
with many warnings.i am attaching the snap of the make when run on ns-2. i hav 
already modified the files like 

packet.h,
cmu-trace.h,
cmu-trace.cc.
ns-packet.tcl,
ns-default.tcl,
ns-lib.tcl,
ns-agent.tcl as given in the code for cornell implementation of zrp.

 make snap

make -k 


g++ -c -Wall  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG 
-DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 
-DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H  
-DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std 
-DUSE_SINGLE_ADDRESS_SPACE -Drng_test  -I. 
-I/home/hero/final2/ns-allinone-2.31/tclcl-1.19 
-I/home/hero/final2/ns-allinone-2.31/otcl-1.13 
-I/home/hero/final2/ns-allinone-2.31/include 
-I/home/hero/final2/ns-allinone-2.31/include -I/usr/include/pcap -I./tcp 
-I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile 
-I./trace -I./routing -I./tools -I./classifier -I./mcast 
-I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr 
-I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv 
-I./satellite -I./wpan -o zrp/zrp.o zrp/zrp.cc 


In file included from zrp/zrp.cc:7: 


zrp/zrp.h:29:1: warning: NULL redefined 


In file included from 
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstddef:50, 


 from 
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstdlib:51, 


 from ./mobile/energy-model.h:42, 


 from ./common/node.h:59, 


 from ./mobile/god.h:53, 


 from ./trace/cmu-trace.h:43, 


 from zrp/zrp.cc:5: 


/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h:400:1: warning: this is 
the location of the previous definition 


zrp/zrp.cc:41:1: warning: IERP_REQUEST_TIMEOUT redefined 


In file included from zrp/zrp.cc:7: 


zrp/zrp.h:35:1: warning: this is the location of the previous definition 


zrp/zrp.cc:49:1: warning: MAX_ROUTE_LENGTH redefined 


zrp/zrp.cc:33:1: warning: this is the location of the previous definition 


zrp/zrp_table.h: In constructor ‘link_struct::link_struct()’: 


zrp/zrp_table.h:100: warning: ‘link_struct::seq_’ will be initialized after 


zrp/zrp_table.h:99: warning:   ‘int link_struct::isup_’ 


zrp/zrp_table.h:82: warning:   when initialized here 


zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry()’: 


zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized after 


zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’ 


zrp/zrp_table.h:161: warning:   when initialized here 


zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry(nsaddr_t)’: 


zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized after 


zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’ 


zrp/zrp_table.h:162: warning:  when initialized here 


zrp/zrp_table.h: At global scope: 


zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member 
‘compute_routes’ 


zrp/zrp_table.h: In member function ‘int RoutingTable::next_hop_to(nsaddr_t)’: 


zrp/zrp_table.h:204: warning: no return statement in function returning 
non-void 


zrp/zrp.cc: In member function ‘void ZRPAgent::print_routes()’: 


zrp/zrp.cc:79: warning: too many arguments for format 


zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent()’: 


zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after 


zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer 
ZRPAgent::PeriodicUpdateTimer_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after 


zrp/zrp.h:247: warning:   ‘int ZRPAgent::myaddr_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h:247: warning: ‘ZRPAgent::myaddr_’ will be initialized after 


zrp/zrp.h:185: warning:   ‘char* ZRPAgent::myid_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h:264: warning: ‘ZRPAgent::qid_’ will be initialized after 


zrp/zrp.h:248: warning:   ‘int ZRPAgent::radius_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent(nsaddr_t)’: 


zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after 


zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer 
ZRPAgent::PeriodicUpdateTimer_’ 


zrp/zrp.cc:178: warning:   when initialized here 


zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after 


zrp/zrp.h:247: warning:   

[ns] zrp compilation on ns-2

2009-03-24 Thread ANSHUL JAIN

-- Forwarded message --
From: ANSHUL JAIN anshul2...@gmail.com
Date: Tue, Mar 24, 2009 at 2:34 PM
Subject: zrp compilation on ns-2
To: ns-users@isi.edu


while compliling zrp on ns-2 i am getting the following error

zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member
‘compute_routes’

zrp/zrp_table.h: In member function ‘int
RoutingTable::next_hop_to(nsaddr_t)’:

with many warnings.i am attaching the snap of the make when run on ns-2. i
hav already modified the files like

packet.h,

cmu-trace.h,

cmu-trace.cc.

ns-packet.tcl,

ns-default.tcl,

ns-lib.tcl,

ns-agent.tcl as given in the code for cornell implementation of zrp.

 kindly reply as i am stuck in between my project. your help would be highly
obliged..
i am usins ns-2.31 on fedora core.i hav read the list and this problem was
not reported

make -k

g++ -c -Wall  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG
-DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H
-DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H
-DHAVE_LIBTCL8_4 -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC
-DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test  -I.
-I/home/hero/final2/ns-allinone-2.31/tclcl-1.19
-I/home/hero/final2/ns-allinone-2.31/otcl-1.13
-I/home/hero/final2/ns-allinone-2.31/include
-I/home/hero/final2/ns-allinone-2.31/include -I/usr/include/pcap -I./tcp
-I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile
-I./trace -I./routing -I./tools -I./classifier -I./mcast
-I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr
-I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv
-I./satellite -I./wpan -o zrp/zrp.o zrp/zrp.cc

In file included from zrp/zrp.cc:7:

zrp/zrp.h:29:1: warning: NULL redefined

In file included from
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstddef:50,


 from
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstdlib:51,


 from ./mobile/energy-model.h:42,

 from ./common/node.h:59,

 from ./mobile/god.h:53,

 from ./trace/cmu-trace.h:43,

 from zrp/zrp.cc:5:

/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h:400:1: warning: this
is the location of the previous definition

zrp/zrp.cc:41:1: warning: IERP_REQUEST_TIMEOUT redefined

In file included from zrp/zrp.cc:7:

zrp/zrp.h:35:1: warning: this is the location of the previous definition

zrp/zrp.cc:49:1: warning: MAX_ROUTE_LENGTH redefined

zrp/zrp.cc:33:1: warning: this is the location of the previous definition

zrp/zrp_table.h: In constructor ‘link_struct::link_struct()’:

zrp/zrp_table.h:100: warning: ‘link_struct::seq_’ will be initialized after

zrp/zrp_table.h:99: warning:   ‘int link_struct::isup_’

zrp/zrp_table.h:82: warning:   when initialized here

zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry()’:

zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized
after

zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’

zrp/zrp_table.h:161: warning:   when initialized here

zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry(nsaddr_t)’:

zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized
after

zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’

zrp/zrp_table.h:162: warning:  when initialized here

zrp/zrp_table.h: At global scope:

zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member
‘compute_routes’

zrp/zrp_table.h: In member function ‘int
RoutingTable::next_hop_to(nsaddr_t)’:

zrp/zrp_table.h:204: warning: no return statement in function returning
non-void

zrp/zrp.cc: In member function ‘void ZRPAgent::print_routes()’:

zrp/zrp.cc:79: warning: too many arguments for format

zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent()’:

zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after

zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer
ZRPAgent::PeriodicUpdateTimer_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after

zrp/zrp.h:247: warning:   ‘int ZRPAgent::myaddr_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h:247: warning: ‘ZRPAgent::myaddr_’ will be initialized after

zrp/zrp.h:185: warning:   ‘char* ZRPAgent::myid_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h:264: warning: ‘ZRPAgent::qid_’ will be initialized after

zrp/zrp.h:248: warning:   ‘int ZRPAgent::radius_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent(nsaddr_t)’:

zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after

zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer
ZRPAgent::PeriodicUpdateTimer_’

zrp/zrp.cc:178: warning:   when initialized here

zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after

zrp/zrp.h:247: warning:   ‘int 

[ns] zrp compilation on ns-2

2009-03-24 Thread ANSHUL JAIN

while compliling zrp on ns-2 i am getting the following error

zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member
‘compute_routes’
zrp/zrp_table.h: In member function ‘int
RoutingTable::next_hop_to(nsaddr_t)’:


with many warnings.i am attaching the snap of the make when run on ns-2. i
hav already modified the files like

packet.h,
cmu-trace.h,
cmu-trace.cc.
ns-packet.tcl,
ns-default.tcl,
ns-lib.tcl,
ns-agent.tcl as given in the code for cornell implementation of zrp.

make -k

g++ -c -Wall  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG
-DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H
-DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H
-DHAVE_LIBTCL8_4 -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC
-DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test  -I.
-I/home/hero/final2/ns-allinone-2.31/tclcl-1.19
-I/home/hero/final2/ns-allinone-2.31/otcl-1.13
-I/home/hero/final2/ns-allinone-2.31/include
-I/home/hero/final2/ns-allinone-2.31/include -I/usr/include/pcap -I./tcp
-I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile
-I./trace -I./routing -I./tools -I./classifier -I./mcast
-I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr
-I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv
-I./satellite -I./wpan -o zrp/zrp.o zrp/zrp.cc

In file included from zrp/zrp.cc:7:

zrp/zrp.h:29:1: warning: NULL redefined

In file included from
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstddef:50,


 from
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstdlib:51,


 from ./mobile/energy-model.h:42,

 from ./common/node.h:59,

 from ./mobile/god.h:53,

 from ./trace/cmu-trace.h:43,

 from zrp/zrp.cc:5:

/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h:400:1: warning: this
is the location of the previous definition

zrp/zrp.cc:41:1: warning: IERP_REQUEST_TIMEOUT redefined

In file included from zrp/zrp.cc:7:

zrp/zrp.h:35:1: warning: this is the location of the previous definition

zrp/zrp.cc:49:1: warning: MAX_ROUTE_LENGTH redefined

zrp/zrp.cc:33:1: warning: this is the location of the previous definition

zrp/zrp_table.h: In constructor ‘link_struct::link_struct()’:

zrp/zrp_table.h:100: warning: ‘link_struct::seq_’ will be initialized after

zrp/zrp_table.h:99: warning:   ‘int link_struct::isup_’

zrp/zrp_table.h:82: warning:   when initialized here

zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry()’:

zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized
after

zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’

zrp/zrp_table.h:161: warning:   when initialized here

zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry(nsaddr_t)’:

zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized
after

zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’

zrp/zrp_table.h:162: warning:  when initialized here

zrp/zrp_table.h: At global scope:

zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member
‘compute_routes’

zrp/zrp_table.h: In member function ‘int
RoutingTable::next_hop_to(nsaddr_t)’:

zrp/zrp_table.h:204: warning: no return statement in function returning
non-void

zrp/zrp.cc: In member function ‘void ZRPAgent::print_routes()’:

zrp/zrp.cc:79: warning: too many arguments for format

zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent()’:

zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after

zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer
ZRPAgent::PeriodicUpdateTimer_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after

zrp/zrp.h:247: warning:   ‘int ZRPAgent::myaddr_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h:247: warning: ‘ZRPAgent::myaddr_’ will be initialized after

zrp/zrp.h:185: warning:   ‘char* ZRPAgent::myid_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h:264: warning: ‘ZRPAgent::qid_’ will be initialized after

zrp/zrp.h:248: warning:   ‘int ZRPAgent::radius_’

zrp/zrp.cc:153: warning:   when initialized here

zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent(nsaddr_t)’:

zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after

zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer
ZRPAgent::PeriodicUpdateTimer_’

zrp/zrp.cc:178: warning:   when initialized here

zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after

zrp/zrp.h:247: warning:   ‘int ZRPAgent::myaddr_’

zrp/zrp.cc:178: warning:   when initialized here

zrp/zrp.h:247: warning: ‘ZRPAgent::myaddr_’ will be initialized after

zrp/zrp.h:185: warning:   ‘char* ZRPAgent::myid_’

zrp/zrp.cc:178: warning:   when initialized here

zrp/zrp.h:264: warning: ‘ZRPAgent::qid_’ will be initialized after

zrp/zrp.h:248: warning:   ‘int ZRPAgent::radius_’


[ns] reg. wireless scenario; making nodes compete for bandwidth with FTP application

2009-03-24 Thread Karthik Talloju

Hi friends, please help me understand how to proceed conceptually with  
the following problem :

I am trying to simulate the following scenario :
There is an access point and multiple nodes in a wireless scenario.  
The nodes are not mobile. When the number of nodes connected to the  
access point are increased, I want to see how the total bandwidth  
available is shared between different wireless nodes : that is, I want  
to see the change in throughput as the number of nodes increase.
Q1.
For this purpose, I have Access Point as TCP source and rest of the  
nodes as TCP sinks. I have a FTP application attached to each of these  
TCP connections. Am I right in doing so ? Should I have it the other  
way?(Access Point as sink and nodes as TCP sources)
Q2.
In order to make each node really 'compete' for the total available  
bandwidth, what parameter concerning the FTP application(or TCP  
connection ?) should I change?


Thank you very much !
Karthik