[ns] LossMoniitor: npkts

2008-10-03 Thread Pasquale Franco








Hi,
I use the command:
set RCVD [$sink  set npkts_]
to know how many packets have been received by ALL node. I'd like to know
how many packet EVERY node  or a group node send.
Should I modify the implementation of Agent?
 
Thanks
_
Tutto il mondo MSN a portata di clic!
http://toolbar.msn.com/overview.aspx?loc=it-it



[ns] Res: LossMoniitor: npkts

2008-10-03 Thread Breno Caetano

Hi Mrs. Franco,
look into ns manual for trace file format. each field into file represents an 
information about the traffic.
an other source is file ns simulator for beginners, which i am sending attach.
A other doubt about this matter, ask us again.
regards

 Breno Caetano da Silva
Bacharel em Ciências da Computação - UFPI
Mestrando em Engenharia Elétrica
Escola de Engenharia de São Carlos - EESC
Universidade de São Paulo
Email: [EMAIL PROTECTED]
[EMAIL PROTECTED]
Fone: (+5516) 81449079
(+5516) 33738149



- Mensagem original 
De: Pasquale Franco [EMAIL PROTECTED]
Para: ns-users@ISI.EDU
Enviadas: Sexta-feira, 3 de Outubro de 2008 7:04:09
Assunto: [ns] LossMoniitor: npkts









Hi,
I use the command:
set RCVD [$sink  set npkts_]
to know how many packets have been received by ALL node. I'd like to know
how many packet EVERY node  or a group node send.
Should I modify the implementation of Agent?

Thanks
_
Tutto il mondo MSN a portata di clic!
http://toolbar.msn.com/overview.aspx?loc=it-it


  Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua 
cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses

Re: [ns] TCP ACKs - change route

2008-10-03 Thread Rafiq Shaikh

Hi Tatiana,

I am also looking for the answer to the same question.

In my simulation I need to send TCP ACKs on a different route as compared
to the TCP data packets. Since I am using wireless MAC the concept of link does 
not apply there. Hence, the routing related command does not apply to my 
scenario. Which means I will have to hack in the code to force the ACK 
packets to take a specific path. As of now I am not sure how to do that.

However, I read in the manual that all the route specific commands use link
concept. The link concept is applicable to wired scenarios. I believe if you 
are using wired links then it should be possible to use rtproto manual or 
rtproto static or something similar to achieve the forced routing of the ACKs.

I hope this helps.

Regards,
-Rafiq.



--- On Tue, 9/30/08, Tatiana Polishchuk [EMAIL PROTECTED] wrote:

 From: Tatiana Polishchuk [EMAIL PROTECTED]
 Subject: [ns] TCP ACKs - change route
 To: Ns-users@ISI.EDU
 Date: Tuesday, September 30, 2008, 1:28 AM
 I remember I saw related question in the list, but without
 answer.
 I'm trying to send the ACKs for the TCP packets using
 specific routes. In
 the tcp-sink.cc module there is a function ack() which
 sends ACK packets
 using send(P, 0)  method. Does anybody know where the
 function is defined
 and there the destination for the packed is specified?
 Please, help.


  



[ns] how to find where a variable is initialized

2008-10-03 Thread Daniel Dekst

Hi, everyone,

How to find where a variable is initialized ?
I add a new mac same as mac-802_11, but it puts warning
MAC_RMAC: accessing MAC cache_ array out of range (src 0, dst 1, size 0)!
I found out that it is due to cache_node_count_ = 0.
It must be set somewhere in MAC/802_11, but I do not know where to find it. I 
think it might be in a .tcl file.
Any help is appreciated!

Best,
Pei


   
-
 雅虎邮箱,您的终生邮箱!

Re: [ns] error compile ZRP

2008-10-03 Thread Batbold Toiruul

No, it is Zone Routing Protocol. this problem is fixed. but there is core
dumped. How can i solve this segmentation fault.

On Fri, Oct 3, 2008 at 1:01 AM, karthi keyen [EMAIL PROTECTED] wrote:

 i'm using ns2.29  may i know what is ZRP is it zigbee routing protocol


 On Thu, Oct 2, 2008 at 12:30 PM, Batbold Toiruul [EMAIL PROTECTED]wrote:


 Hi guys,
 i am implementing ZRP on ns-2.27. But I compile the codes of ns-2.27 using
 'make' command after finish all changes. I received error.

 error:
autoconfig.h:85: error: namespace CPP_NAMESAPCE undeclared.

 i am new at ns-2. So please, if anyone knows, help me?

 sincerely,
 Bold





[ns] segmentation fault (core dumped) using ZRP in ns-2.27

2008-10-03 Thread Batbold Toiruul

Dear ns-users,
I installed Zone Routing Protocol (ZRP) on ns-2.27. However, when i use ZRP
to run below example, I got the segmentation fault (Core Dumped).
I don't know why this kind of error is occured. if anyone knows, please help
me.

thank you very much in advance
sincerely,
Batbold


set val(chan)   Ch.annel/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) 500 ;# max packet in ifq
set val(nn) 22 ;# number of mobilenodes
set val(rp) ZRP;# routing protocol
set val(x)1000
set val(y)[expr ($val(nn)+1)*250]

# Initialize Global Variables
set ns_[new Simulator]
set tracefd [open mo4.tr w]
$ns_ trace-all $tracefd

set namtrace [open mo4.nam w]
$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
create-god $val(nn)

# New API to config node:
# 1. Create channel (or multiple-channels);
# 2. Specify channel in node-config (instead of channelType);
# 3. Create nodes for simulations.

# Create channel #1 and #2
set chan_1_ [new $val(chan)]
set chan_2_ [new $val(chan)]

# Create node(0) attached to channel #1

# configure node, please note the change below.
$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) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON \
-channel $chan_1_


# node_(1) can also be created with the same configuration, or with a
different
# channel specified.
# Uncomment below two lines will create node_(1) with a different channel.
#  $ns_ node-config \
# -channel $chan_2_
#set node_(0) [$ns_ node]
#set node_(8) [$ns_ node]

#$node_(0) random-motion 0
#$node_(8) random-motion 0

for {set i 0} {$i  $val(nn)} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0
$ns_ initial_node_pos $node_($i) 20
}

#
# Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes
#
#$node_(0) set X_  500.0
#$node_(0) set Y_  250.0
#$node_(0) set Z_ 0.0
#...
#$node_(8) set X_  500.0
#$node_(8) set Y_ 2250.0
#$node_(8) set Z_ 0.0

for {set i 0} {$i  10 } {incr i} {
   $node_($i) set X_  750.0
   $node_($i) set Y_ [expr $i*250+5]
   $node_($i) set Z_ 0.0
}
for {set i 10} {$i  20 } {incr i} {
   $node_($i) set X_ 250.0
   $node_($i) set Y_ [expr ($i-10)*250+5]
   $node_($i) set Z_ 0.0
}

$node_(20) set X_ 500.0
$node_(20) set Y_ 5.0
$node_(20) set Z_ 0.0

$node_(21) set X_ 500.0
$node_(21) set Y_ 505.0
$node_(21) set Z_ 0.0

#for {set i 0} {$i  3} {incr i} {
  #for {set j 0} {$j  3} {incr j} {
#$node_([expr $i+$j*3]) set X_ [expr $i*250]
#$node_([expr $i+$j*3]) set Y_ [expr $j*250]
#$node_([expr $i+$j*3]) set Z_ 0.0
  #}
#}


# Now produce some simple node movements
# Node_(1) starts to move towards node_(0)
#
#$ns_ at 3.0 $node_(5) setdest 100.0 500.0 05.0
#$ns_ at 100.0 $node_(5) setdest 100.0 500.0 00.0
#$ns_ at 200.0 $node_(5) setdest 005.0 700.0 05.0
#$ns_ at 3.0 $node_(0) setdest 48.0 38.0 5.0

# Node_(1) then starts to move away from node_(0)
#$ns_ at 20.0 $node_(1) setdest 490.0 480.0 30.0

# Setup traffic flow between nodes
#TCP connections between node_(0) and node_(1)

set udp [new Agent/UDP]
$udp set fid_ 2
set sink [new Agent/Null]
$ns_ attach-agent $node_(10) $udp
$ns_ attach-agent $node_(9) $sink
$ns_ connect $udp $sink

set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set type_ CBR
$cbr set packet_size_ 100
$cbr set rate_ 10kb
$cbr set random_ false
$ns_ at 10.0 $cbr start
$ns_ at 100.0 $cbr stop

#set tcp [new Agent/TCP]
#$tcp set class_ 1
#$tcp set fid_ 2
#set sink [new Agent/TCPSink]
#$ns_ attach-agent $node_(2) $tcp
#$ns_ attach-agent $node_(5) $sink
#$ns_ connect $tcp $sink

#set ftp [new Application/FTP]
#$ftp attach-agent $tcp
#$ftp set type_ FTP
#$ns_ at 23.0 $ftp start
#$ns_ at 173.0 $ftp stop

Mac/802_11 set dataRate_ 1Mb

for {set i 0} {$i  $val(nn) } {incr i} {
 set r_($i) [$node_($i) set ragent_]
  $ns_ at 0.0 $r_($i) radius 2.0
 # @@@ $ns_ at 0.4 $r_($i) beacon_period 12.0
 # @@@ $ns_ at 0.0 $r_($i) radius 1.0
 }

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

Re: [ns] problem ftp Application

2008-10-03 Thread Mayur

Breno Caetano wrote:

  hi ns-users, 
 i can treat receive messages when i use a ftp application over agents TCP. i 
 dont find source ftp application, more specifically file ftp.cc. i just find 
 others files and ftp.h.
 anybody can help me?
 regards

 Breno Caetano da Silva
 Bacharel em Ciências da Computação - UFPI
 Mestrando em Engenharia Elétrica
 Escola de Engenharia de São Carlos - EESC
 Universidade de São Paulo
 Email: [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Fone: (+5516) 81449079
 (+5516) 33738149



   Novos endereços, o Yahoo! que você conhece. Crie um email novo com a 
 sua cara @ymail.com ou @rocketmail.com.
 http://br.new.mail.yahoo.com/addresses
Yes, FTP and Telnet applications are implemented in OTcl only, (not in 
C++), hence no .cc files for them You may read Chapter 39 of ns 
manual to know further how could you achieve what you intend to do 
through the TCL script itself.

Mayur



[ns] prob with NAM

2008-10-03 Thread Sivasankari SV

Hi,

When i try to run any existing tcl file esp for wireless 802.11 simulations
- the NAM is not working fine with ns-2.31 aand ns 2.33 . The error is
*node 0 not found.. node 1 not found.. etc..*
These errors , as i understand, come when the nodes are not in the range of
NAM.. (??)
Ialso came across the 'playing backwards' technique- But it worked only to
an extent and it doesnt make any sense.

why doesnt even the example codes for wireless work on NAM ?
Could anybody help me..

Thank you
Sivasankari


[ns] prob with NAM

2008-10-03 Thread Sivasankari SV

Hi,

When i try to run any existing tcl file esp for wireless 802.11 simulations
- the NAM is not working fine with ns-2.31 aand ns 2.33 . The error is
*node 0 not found.. node 1 not found.. etc..*
These errors , as i understand, come when the nodes are not in the range of
NAM.. (??)
Ialso came across the 'playing backwards' technique- But it worked only to
an extent and it doesnt make any sense.

why doesnt even the example codes for wireless work on NAM ?
Could anybody help me..

Thank you
Sivasankari