[ns] Change the Size of CTS(NS2) on 802.11

2007-03-23 Thread hamid reza

Dear all, 
Can you change the size of CTS(From 14 to 17)?
I really appreciate from incomming Comments.

Best Regards
Hamid R.Afrancheh





 

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 



[ns] Routing agent exchange

2007-03-23 Thread Ulrich Herberg

In an agent I would like to change the routing protocol agent of a
wireless node. I can successfully insert a new routing agent, but I
somehow get a segmentation fault from the old agent:

The following code is executed from the C++ agent (with tcl.evalf()):
   set ragent_(0) [new Agent/OLSR 0]
   $ns_ attach-agent $node_(0) $ragent_(0)
   $ragent_(0) start
   $node_(0) set ragent_ $ragent_(0)
   foreach dumbagent [Agent/DumbAgent info instances] {
if { [$dumbagent id] == 0} { ;# note: dumbagent has been
modified to save the node id
$dumbagent close
$ns_ detach-agent $node_(0) $dumbagent
break
}}
   delete $dumbagent


The new OLSR agent sucessfully starts, however, the old dumbagent seems
not be completely deleted (or detached). Here is the gdb output:
   Program received signal SIGSEGV, Segmentation fault.
   0x004224fc in PortClassifier::classify ()
   (gdb) bt
   #0  0x004224fc in PortClassifier::classify ()
   #1  0x0041ca2d in Classifier::find ()
   #2  0x0041cb74 in Classifier::recv ()
   #3  0x004f9d12 in DumbAgent::recv ()
   #4  0x0041cba6 in Classifier::recv ()
   #5  0x004f9d12 in DumbAgent::recv ()
   #6  0x0041cba6 in Classifier::recv ()
   (...)

Thanks for your advice,

Ulrich




[ns] how tcp-elfn works

2007-03-23 Thread Satish B

sir/madam

I would like to make simulation of ELFN mechanism of G.Holland in ns-2. I came 
to know from one of the research paper that code of ELFN simulation in ns-2 is 
made public. Can any one help me to find code.
Thank you.


[ns] configuration 2 interfaces (in 2 different channels) with 802.11a and 802.11b

2007-03-23 Thread Elena Putzolu




thanks Marcel,
but my demand did not refer to the values that variable statics must 
assume (the values they can modify easy), I need help for  the 
interface  set up in tcl languages.
Which are the commands who allow me to shape in way corrected the static 
tcl variable for every interface and in every channel from defined me 
(chan_a_, chan_b_). And moreover, Where I must put these commands in my 
script in way cha the configuration it is valid?
You can help me in this?
thanks for your interest
Elena
(My script is under)

Marcel Castro ha scritto:
 Elena and All,
  According to some 802.11a cards specification, the basicRate_ for 
 802.11a and g should be 6 Mbps.
  See 
 http://www.3com.com/products/en_US/detail.jsp?tab=prodspecsku=3CRDAG675Bpathtype=purchase
  
 http://www.3com.com/products/en_US/detail.jsp?tab=prodspecsku=3CRDAG675Bpathtype=purchase.
  Could anybody clarify that?
 
 Marcel
 


 On 3/22/07, *Elena Putzolu* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:




 Hi ns-users,
 In my script I would want  set up the Access Point with 2
 interfaces in
 2 different channels (chan_a,chan_b), one with the standard
 802.11a and
 the other second standard 802.11b.
 Please, I have need help in order to understand if
 my  configuration is
 correct! If isn't, can you give a suggestion to me?
 (in my script the configuration of the nodes follows mw-node)

 My script:

 global val_
 set val_(channel) Channel/Wireless;# channel
 set val_(propagation) Propagation/TwoRayGround ;#
 radio-propagation model
 set val_(phy) Phy/WirelessPhy  ;# physical layer
 set val_(mac) Mac/802_11   ;# mac layer
 set val_(ifq) Queue/DropTail/PriQueue  ;# interface queue
 type
 set val_(ll)  LL   ;# link layer type
 set val_(antenna) Antenna/OmniAntenna  ;# antenna model
 set val_(ifqlen)  50   ;# max packet in ifq
 set val_(routing) None;# routing
 set val_(nMn)  2
 set val_(nAP)  2
 set val_(x)   150
 set val_(y)   150
 set val_(tr)  esercizi/out5.tr;# trace file
 set val_(namtr)   esercizi/out5.nam;# nam trace file
 set val_(stopTime)15

 set chan_a   [new $val_(channel)]
 set chan_b   [new $val_(channel)]
 
 
 $ns_  wireless-config   -routing$val_(routing) \
 -mac$val_(mac) \
 -phy$val_(phy) \
 -propagation[new $val_(propagation)] \
 -topography $topography_ \
 -ll $val_(ll) \
 -ifq$val_(ifq) \
 -ifq-length $val_(ifqlen) \
 -antenna$val_(antenna) \
 -xyz-trace  on \
 -ifq-trace  on \
 -mac-trace  on \
 -rtm-trace  on \
 -eot-trace  off

 #---portal node
 $ns_ node-config -wireless +Portal ;# enable Portal support
 for {set i 0} {$i$val_(nAP)} {incr i} { ;#ACCESS POINT

 $ns_ wireless-config -channel  $chan_a

set node_AP($i) [$ns_ node 1.[expr $i+1].0]
$node_AP($i) set-position [expr 100.0*$i*$i ] 100.0 0.0
set netif_a($i) [$node_AP($i) add-interface Wireless] ;# add
 wireless interface

 ##802.11a
set mac_a($i) [new $val_(mac)]
$mac_a($i) set SlotTime_  0.50;# 50us
$mac_a($i) set SIFS_  0.28;# 28us
$mac_a($i) set PreambleLength_0;# no preamble_
$mac_a($i) set PLCPHeaderLength_  128   ;# 128 bits
$mac_a($i) set PLCPDataRate_   1.0e6   ;# 1Mbps
$mac_a($i) set dataRate_  54.0e6  ;# 54Mbps
$mac_a($i) set basicRate_ 1.0e6   ;# 1Mbps

$netif_a($i) set Pr_ 8.9175e-10
$netif_a($i) set Pt_ 0.2818
$netif_a($i) set freq_ 5.0e+9
$netif_a($i) set RXThresh_  1.60607e-10
$netif_a($i) set CSThresh_ [expr 0.9*[$netif_a($i) set RXThresh_]]

$mac_a($i) netif $netif_a($i)


 $ns_ wireless-config -channel  $chan_b

   set netif_b($i) [$node_AP($i) add-interface Wireless] ;# add
 wireless interface

 ##802.11b/g
   $netif_b($i) set Pr_ 8.9175e-10
   $netif_b($i) set Pt_ 0.007214
   $netif_b($i) set freq_ 2.4e+9
   $netif_b($i) set RXThresh_  7.138e-11
   $netif_b($i) set CSThresh_ [expr 0.9*[$netif_b($i) set RXThresh_]]

   $netif_b($i) set DSSS_CWMin 15
   

[ns] header packets files

2007-03-23 Thread Jezabel Miriam Molina Gil

I am working with mobile nodes and I want to add a new header field. I have
find the files hdr_sr.h and hdr_sr.cc but they are for dsr headers, someone
know which are the header files  for mobile nodes in general?

-- 
Saludos
Jezabel M. Molina Gil


[ns] About mobility models in ns-2

2007-03-23 Thread super.ismiti

Hi all,

I'm need some help with mobility models in ns-2.

I read in a paper that a person used the ScenGen tool to generate the
scenery.
I have a source in C++ that may be of the mobility model that this author
made.

So, I'd like know how I can use a mobility model in a simulation.
I know that the ns-2 can't read a source of a mobility model, but it works
with the command setDest.

I need to put the source of this model in the ScenGen to this one create the
trace for my simulation and the ns-2 will read this trace created?!
I don't know how it works and I haven't found anything more specific in the
Internet yet.

Thanks in advance,
Ricardo.


[ns] R: problem in delay and throughput script

2007-03-23 Thread Marco Fiore


Ibrahim,

download the latest version from
http://reti.polito.it/fiore
and follow the read.me for instructions on how to run the scripts.

bye,

Marco


Messaggio originale
Da: [EMAIL PROTECTED]
com
Data: 22-mar-2007 10.19 AM
A: ns-users@ISI.EDU
Ogg: [ns] 
problem in delay and throughput script


Hi all,
  I have worked 
for  TRACE format .I have used  delay.awk,throughput.awk for my tcl 
progrm 
It runs successfully for delay but not for thrpughput.
for 
throughput error :
 awk: thrput.awk:44: (FILENAME=hybrid.tr 
FNR=122048) fatal: division by zero attempted
while executing
 
awk -f thrput.awk hybrid.tr  result.tr

for delay
  it runs 
successfully.But the problem is that the new file generated (.tr) is 
empty.The new file has not any data.
   
  # throughput.awk
   BEGIN 
{
 recv = 0
 }
 {
 # Trace line format: normal
 if ($2 != -t) {
 event = $1
 time = $2
 if (event == + || event 
== -) node_id = $3
 if (event == r || event == 
d) node_id = $4
 flow_id = $8
 
pkt_id = $12
 pkt_size = $6
 }
 # 
Trace line format: new
 if ($2 == -t) {
 
event = $1
 time = $3
 node_id = $5
 flow_id = $39
 pkt_id = $41
 pkt_size = $37
 }
 # Calculate 
total received packets' size
 if (flow_id == flow  event == 
r  node_id == dst) {
 if (flow_t != sctp) {
 recv += pkt_size - hdr_size
 #printf(recv[%g] = %g %g\n,node_id,pkt_size
  -hdr_size,recv)
 } else {
 
# Rip off SCTP header, whose size depends
 # 
on the number of chunks in each packet
if 
(pkt_size != 448  pkt_size != 864  
  pkt_size != 1280) pkt_size = 
0
 if (pkt_size == 448) pkt_size = 400
 if (pkt_size == 864) pkt_size = 800
 if (pkt_size == 1280) pkt_size = 1200
 recv += pkt_size
 
#printf(recv[%g] = %g -- tot: %
  g\n,node_id,pkt_size,recv)
 }
 }
 }
 END {
 printf(%10g %10s 
%10g\n,flow,flow_t,(recv/simtime)*(8/1000))
 }

  #Delay.awk
BEGIN 
{
 for (i in send) {
 send[i] = 0
 }
 for (i in recv) {
 recv[i] = 0
 }
 delay = avg_delay = 0
 }
 {
 # Trace line format: 
normal
 if ($2 != -t) {
 event = $1
 time = $2
 if (event == + || event 
== -) node_id = $3
 if (event == r || event == 
d) node_id = $4
 flow_id = $8
 
pkt_id = $12
 }
 # Trace line format: new
 
if ($2 == -t) {
 event = $1
 time = 
$3
 node_id = $5
 flow_id = $39
 pkt_id = $41
 }
 # Store packets 
send time
 if (flow_id == flow  node_id == src  send
[pkt_id] == 0  (event == + || event 
  ==s)) {
 
send[pkt_id] = time  
 }
 # Store packets 
arrival time
 if (flow_id == flow  node_id == dst  event 
== r) {
 recv[pkt_id] = time
}
 }
 END {
 # Compute average delay
 for (i in recv) {
 if (send[i] == 0) {
 printf
(\nError %g\n,i)
 }
 delay += recv
[i] - send[i]
 num ++
 }
 printf(%
10g ,flow)
 if (num != 0) {
 avg_delay = 
delay / num
 } else {
 avg_delay = 0
 }
 printf(%10g\n,avg_delay*1000)
}
   
  thanks
   
  ibrahim

 
-
Don't be 
flakey. Get Yahoo! Mail for Mobile and 
always stay connected to 
friends.





Re: [ns] Problem setting BO,SO pair in 802.15.4

2007-03-23 Thread Stefano Busanelli

Thanks for your quick reply,

I've tried to patch CsmaCA802_15_4::canProceed method, but the problem
isn't disappeared.

I've noticed that the problem is present only on
SCS802_15_4::startDevice method and not in 
SSCS802_15_4::startPANCoord method.

In addition there are little different between these methods, so 
I've tried to modify SCS802_15_4::startDevice method, replacing:

scan_BO = sscsTaskP.startDevice_BO + 1;

with:

scan_BO = sscsTaskP.startDevice_BO;

In this way output error vanishes but I'm not really sure that this is a
true solution because I don't have deeply studied code yet

Best regards.

Busanelli Stefano








Il giorno gio, 22/03/2007 alle 09.35 -0400, Ahmad Khayyat ha scritto:
 This reminds me about a bug in the original wpan implementation. Not
 sure if it is fixed in Iyappan patch as I am using ns-2.29.
 
 In the method:
 bool CsmaCA802_15_4::canProceed(double wtime, bool afterCCA)
 
 The following declaration exists:
 
 UINT_16 t_bPeriods,t_CAP;
 
 For large BO/SO values, UINT_16 is insufficient. I replaced it with
 UINT_32 and many problems with large BO/SO values were resolved. I used
 to get poor delivery ratio but now it is reasonable.
 I have no idea whether this has anything to do with your problem, but
 you might want to give it a try. There is a good chance it does. Make
 sure you update the type casts related to these two variables in this
 method, too.
 
 - Ahmad
 
 
 On Thu, 22 Mar 2007 10:47:37 +0100
 Stefano Busanelli [EMAIL PROTECTED] wrote:
 
  
  Hi all,
  
  I'm using ns-allinone-2.31 package, that includes 802.15.4
  implementation made by Zheng subsequently patched by Iyappan.
  
  If I set to 14 both Beacon Order (BO) and Superframe Order (SO) values
  of a generic device (not coordinator), ns returns this error message:
  
  ![0.30](node 1) unable to start as a device: active channel scan
  failed -
  
  This happens using scss methods and independently from the values
  assumed by others flags, like assoPermit or isFFD.
  
  Instead if I set BO=14 and SO=13, all works well.
  
  Am i making some mistakes or the legal pair (BO=14,SO=14) is not
  admitted in current implementation of 802.15.4?
  
  I'm looking forward to receive your prompt reply.
  
  Best regards
  
  Busanelli Stefano
  



[ns] ScenGen - tutorial?

2007-03-23 Thread super.ismiti

Hi,

Someone know some tutorial about ScenGen?

THanks,
Ricardo.


[ns] CURRENT IFQ LENGTH URGENT

2007-03-23 Thread antonis antoniou



Dear all,

i am a newbie in ns and
i want to take the current value of ifq length ...
can any one help how can i achieve this??




Re: [ns] help:Can anyone send me a wireless script which uses Node Movement and Topology Generation Traffic Pattern Generation

2007-03-23 Thread Shailesh Gamit

this script will create random topology for random no. of nodes , for
random movement and at random amount of time
i think this was what u need.

set min 5.0   #min value
set max1 480.0  #max val of time

set max2 990.0# x-coordinat


set max3 990.0 #y-coordinate

set max4 20.0 #max mobility

set max5 39  #no of node==40

proc value {min max1} {

return [expr {int(rand()*($max1+1))}]

}

proc value_x {min max2} {

return [expr {int(rand()*($max2+1))}]

}

proc value_y {min max3} {

return [expr {int(rand()*($max3+1))}]

}

proc value_z {min max4} {

return [expr {int(rand()*($max4+1))}]

}

proc node_x {min max5} {

return [expr {int(rand()*($max5+1))}]

}

for {set t 0} {$t  100 } { incr t } {

$ns at [value $min $max1] $node_([node_x $min $max5]) setdest [value_x $min
$max2] [value_y $min $max3] [value_z $min $max4]

}


On 3/22/07, Vijay Kumar c [EMAIL PROTECTED] wrote:


 Hi ns users,

 Can anyone send me a wireless script which uses Node Movement and Topology
 Generation   Traffic Pattern Generation which uses the setdest tool and
 cbrgen traffic there are some errors when i run Marc Greis tutorial script
 *
 wireless1.tcl* can anybody send any other script other than wireless1.tclby
 which i can include the Node Movement and Topology Generation   Traffic
 Pattern Generation  file so that i can run the script in my PC.

 Plz try to attach or paste the tcl script in your e-mail

 Plz help me your  valuble suggesstions and comments are always welcome.

 Thanks and Reg:
 Vijay




-- 
Shailesh Gamit
M.Tech (CSE),
Nirma Institute of Technology,
Ahmedabad, India


[ns] Problems with the WiMAX NIST patch

2007-03-23 Thread wacky

hey ns-users,

 ive installed the NIST wimax patch, but when i try to simulate 
 simple.tcl(comes with the rar file) i get an error msg saying,
 invalid command name Mac/802_16
while executing
 Mac/802_16 set debug_0
  file simple.tcl line 45


thanks for your help.

rgrds
WA Iqbal


[ns] something about CBQ

2007-03-23 Thread cmxhr

hi everyone
how to understand the relation between eligible_formal 
,eligible_ancestros,eligible_toplevel and MAXLEVEl
I want to classify  some flows into a flow class by their weights,how to do 
it by modify the CBQ source code.
 Thanks 
   chenmaoxiang 

---
大小单双 机会多多,10分钟就开奖,立即返奖( 
http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070319.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

[ns] something about CBQ

2007-03-23 Thread cmxhr


hi everyone
how to understand the relation between eligible_formal 
,eligible_ancestros,eligible_toplevel and MAXLEVEl
I want to classify  some flows into a flow class by their weights,how to do 
it by modify the CBQ source code.
 Thanks 
   chenmaoxiang 
---大小单双 
机会多多,10分钟就开奖,立即返奖( 
http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070319.html 
)===注册新浪2G免费邮箱( 
http://mail.sina.com.cn/chooseMode.html )

---
大小单双 机会多多,10分钟就开奖,立即返奖( 
http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070319.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )