Re: [ns] port number

2006-05-04 Thread Hajer FERJANI

Hi,
These tcl commands are implemented in Node.cc or MobileNode.cc in the
command( ) method which is used to add tcl commands.
Bye.



On 4/28/06, Chams D [EMAIL PROTECTED] wrote:

 Hi,
 can anyone tell me how to use the procedure $node id
 or $node port ???
 and also where are theses methodes implemented,
 because I need to implement a new method like this.
 thanx

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com





[ns] moving mobile nodes

2006-05-04 Thread debojit boro

Hi all,
   I m trying to implement a simple DSR protocol.
Whenever i create a mobile node such as set
mobilenode [new Node/MobileNode] the nodes don't tend
to move but if created as set node [$ns_ node] the
mobile nodes moves.Why is it happening??Can anyone
please plzz tel me the reason.Plzz help me put.

  Thanks in advance.

 Regards
 Debojit Boro.




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



Re: [ns] Connecting agents--many to many

2006-05-04 Thread Hajer FERJANI

Hi,

You can do that by specifying a port number for your agent and then
attach your agent to the nodes through that port. That way, an agent
can communicate with any other agent by specifying its address and
port id.
Example :

- In .h and .cc files:

#define CLUSTERING_PORT 113
struct hdr_ip *ih = HDR_IP(p);
ihpk-daddr() = dest; // destination node address
ihpk-saddr() = index;
ihpk-sport() = CLUSTERING_PORT;
ihpk-dport() = CLUSTERING_PORT;

- In .tcl script :

#creating clustering agents and attaching them to nodes through port 113.
for {set j 0} {$j  $opt(nn) } {incr j} {
set clagent_($j) [new Agent/Clustering [$node_($j) node-addr] ]
$node_($j) attach $clagent_($j) 113
}

Hope it helps.
Regards.

On 5/2/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I am currently trying to develop a simulation in which a wireless sensor
 network with sleeping nodes has an ad-hoc backbone of nodes with a higher
 duty cycle to reduce latency.  In order for this scenario to work, however,
 nodes must be able to negotiate with logical children and neighboring nodes
 in order to nominate backbone nodes.  I have implemented this logic as an
 Agent subclass; however, I am now realizing that Agents seem to have only a
 one-to-one relationship.  Is there a workaround for this (so that an Agent
 may have multiple agents it can communicate with?) I have tried calls
 through the OTCL linkage directly to the interpreter to try and reconnect
 nodes on the fly, but this does not seem to work.  Does anyone have any
 suggestions?





[ns] Usual Mistake

2006-05-04 Thread hamid reza

Hi All,
Most  people used below instruction for calculating a
bandwidth 
#Calculate the bandwidth (in MBit/s) and write it to
the files
puts $grfd $now [expr $bw1/$time*8/1024/1024] [expr
$bw2/$time*8/1024/1024] [expr $bw3/$time*8/1024/1024]

But I Think The Correct one is :
#Calculate the bandwidth (in MBit/s) and write it to
the files
puts $grfd $now [expr $bw1*8/$time/1024/1024] [expr
$bw2/$time*8/1024/1024] [expr $bw3/$time*8/1024/1024]

I did this on ns
set  x 5;
set  y 2;
puts   [expr $x/$y*8/2/2];
output :4
but
set  x 5;
set  y 2;
puts   [expr $x*8/$y/2/2];
output: 5

Whay is your ideas?

Best Regards
Hamid Reza


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



[ns] MANET Having DIFFERENT Routing Protocol in ONE Network

2006-05-04 Thread S. Alex Nikzad

Hi everyone,

(In my project, I've focused on DSR and Black hole attacks ...)
I wanna implement different routing protocol in my testbed : DSR and 
modified DSR

I will be appreciate you if I recieve some hints to treat this query:
  How can I FLAG a node uses MALICIOUS dsragent.cc or a NORMAL dsragent.cc? 
(where the both dsragent should be compiled simultaneously)
thanx in advance


[ns] How can I estimate delay in Diffserv

2006-05-04 Thread ghazale khojaste


Dear Ns-users:
 I have a question about Ns 2.27:
 I am training in Diffserv.
 How can I estimate delay for each class?
 Send me a TCL file that estimated delay please.
 
yours,
 ghazale khojaste


-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1cent;/min.


[ns] Warning message

2006-05-04 Thread Chams D

Hi 
I created a new type of header for my agent and of
course I put a new offset that I called off_source_
but when I run my tcl script I obtain this warning
message

warning: no class variable Agent/Source::off_source_

How can I correct that.
Thanx

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Re: [ns] How can I estimate delay in Diffserv

2006-05-04 Thread Alexander Sayenko

Hi

First, if you want to estimate the delay, you need AWK or perl script to
analyse the trace file. Second, there is no such a thing as a class delay.
You can estimate mean delay of packets belonging to some class (or the
maximum delay), but you still need to analyse the trace file.

Sincerely,
Alexander Sayenko (PhD)
Assistant
Telecommunication laboratory, MIT department
University of Jyvaskyla, Finland




 Dear Ns-users:
  I have a question about Ns 2.27:
  I am training in Diffserv.
  How can I estimate delay for each class?
  Send me a TCL file that estimated delay please.

 yours,
  ghazale khojaste


 -
 Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great
rates starting at 1cent;/min.



Re: [ns] Usual Mistake

2006-05-04 Thread Hai Nam

I think it's just because the results are rounded to integers after
each step. Replace
set x 5
by
set x 5.0
will return the correct answer.

With kind regards,

--
Hai-Nam NGUYEN
http://www.jcisio.com



[ns] Usual Mistake

2006-05-04 Thread hamid reza

Thanks For you Responses,
But I dont know
Are Bytes Recieved From Agents Store as double in bw
variable or store at int in it?
if store as double anything be ture.
but if store as int this bug exist in our codes.


Regards
Hamid Reza




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Re: [ns] Usual Mistake

2006-05-04 Thread Alexandra Cioroianu

Hello Hamid!
 I think the first expression would be correct if $bw1 was expressed in bits, 
not octets(8 bits/8=1 Byte, not 8 bits*8=1 byte). But since the packets' sizes 
are measured in bytes(octets), i think that 8 is not necessary anymore, the 
measuring unit will result in MBps without multipying with 8.
 Regards, Alexandra

hamid reza [EMAIL PROTECTED] wrote: 
Hi All,
Most  people used below instruction for calculating a
bandwidth 
#Calculate the bandwidth (in MBit/s) and write it to
the files
puts $grfd $now [expr $bw1/$time*8/1024/1024] [expr
$bw2/$time*8/1024/1024] [expr $bw3/$time*8/1024/1024]

But I Think The Correct one is :
#Calculate the bandwidth (in MBit/s) and write it to
the files
puts $grfd $now [expr $bw1*8/$time/1024/1024] [expr
$bw2/$time*8/1024/1024] [expr $bw3/$time*8/1024/1024]

I did this on ns
set  x 5;
set  y 2;
puts   [expr $x/$y*8/2/2];
output :4
but
set  x 5;
set  y 2;
puts   [expr $x*8/$y/2/2];
output: 5

Whay is your ideas?

Best Regards
Hamid Reza


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




-
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.


Re: [ns] TCL Simulation script/C++ interaction query wrt AODV routing protocol

2006-05-04 Thread Paul Kiddie

Hi,

Many thanks for your speedy reply, the 'bind' command is exactly what I
was thinking of doing for tying C++ variables with TCL variables, but
now I'm wondering where I should put these bind commands (as far as
which source file is concerned) to be able to access it as: '$node set
isMalicous_ 0' within my simulation TCL script. If I were to put it
directly into the AODV::AODV constructor within AODV.CC as specified in
the NS documentation for an Agent, how would I access the individual
node's isMalicious_ property? I am currently using the node-config API
to instantiate all my ad hoc nodes, should I be doing this to have to
kind of granular control I need?

Many Thanks,
Paul


-

Paul Kiddie
1st Year PhD Electronic  Electrical Engineering
School of Electronic, Electrical  Computer Engineering, University Of
Birmingham, Edgbaston, Birmingham, B15 2TT

-Original Message-
From: debojit boro [mailto:[EMAIL PROTECTED] 
Sent: 04 May 2006 12:12
To: [EMAIL PROTECTED]
Subject: Re: [ns] FW: TCL Simulation script/C++ interaction query wrt
AODV routing protocol

Hi,
  I'm doin project on the same thing but slightly different from what u
r doing.I think to access the variables both in Tcl scripts as well as
C++ code u need to bind the variables such as :
bind(isMalicious_,isMalicious_).I think u better consult the NS
manual.Plzz reply me if it works.

 Debojit Boro.

 M.Tech(IT) 4th Sem 
 Deptt. of Computer Science and 
 Information Technology
 Tezpur University,
 Napaam,Tezpur
 Dist-Sonitpur,Assam,India
 

--- Paul Kiddie [EMAIL PROTECTED] wrote:

 
  Hi all,
  
  I'm new to NS-2 simulation and in my research im
 looking at MANET
  routing protocols, namely the AODV routing
 protocol. In my simulation
  work I would like to simulate 'malicious' nodes on
 the network, but be
  able to control whether a node is malicious or not
 via a TCL script,
  and also in what ways it is malicous. 
  
  For example, it would be nice in my TCL script to
 enable/disable
  malicousness by: $ns at $x $node($i) set
 isMalicous_ 0. I need to be
  able to access these variables both in my
 simulation TCL script, and
  also in the AODV C++ script, to take the desired
 action. Can anyone
  shed any light on how I would go about this?
  
  Many Thanks,
  Paul
  
  -
  
  Paul Kiddie
  1st Year PhD Electronic  Electrical Engineering School of 
  Electronic, Electrical  Computer
 Engineering,
  University Of Birmingham,
  Edgbaston,
  Birmingham,
  B15 2TT
  
 




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



Re: [ns] the neighbors in networks simulator,no one can help me?

2006-05-04 Thread Hai Nam

Hello,

god.cc is used for wireless networks simulation in general. I don't
know if IsNeighbor is used, but you can search for IsNeighbor in ~ns
to verify that (grep -r ...).

About AODV (and any wireless routing protocols that use HELLO
message, I thinks), look at ~ns/aodv/aodv.cc, in the function
recvHello(), you'll see that a neighbor is a node from whom you can
hear directly (HELLO message won't be forwarded).

If you want the correct definition of neighbor or other
terminologies, take a look at RFC 3753. In my opinion, you should not
redefine this term as you said in a few messages ago. It'd better
invent a different term.

Finally, about the mailing lists. Usually you'll have a reply in less
than 24h, but it might take a few days. You can do some research, or
post in another mailing list (as I can see uptill now, 2 long replies
from MANET WG, so I try to be short ^_^).

Good luck ( bon courage *_* ).

On 5/3/06, www triste [EMAIL PROTECTED] wrote:

 Hello everybody,
   i ask this question 3 times,but no one help me
   i delate the Isneighbor fonction in god.cc and i recompile the 
 ns-allinone,nothing change,no probleme when i compile my tcl file!!
   that s mean that aodv package don't use the Isneighbor fonction
   help me please,really i can't see solution,where can i find the detection 
 of neighbor in aodv code.please help
 Thanks lot,


--
Chào thân ái, With kind regards, Cordialement,

Hai-Nam NGUYEN
http://www.jcisio.com



[ns] providing more realistic nodes mobility traces referred to ad hoc network simulation

2006-05-04 Thread Luo.Gang

Hi all,

I write for asking your help.
I have an excited idea about providing more realistic nodes mobility 
traces referred to ad hoc network simulation, such as in NS2, and I plan to 
implement it in this summer vacation. I will describe my general idea and the 
reason why I need your help as follows.  

It's well known that several synthetic mobility models have been 
proposed for (or used in) the performance evaluation of ad hoc network 
protocols, such as Random Waypoint Mobility Model, Gauss-Markov Mobility Model 
and Reference Point Group Mobility Mobel[1]. It's a good way to introduce 
realistic traces into simulations, just like the Internet traffic archive. The 
problem is we don't have abundant trace archives since the ad hoc network has 
not been used widely.
My idea is that, we could utilize the cyber-games entities traces in ad 
hoc simulation. There are a kind of game in which people control hundreds of 
entities to fight with each other, and when the game is over, people could save 
the replays in files and share them. Is it exciting if there are hundreds to 
thousands entities moving on a map under real players' decision? I believe it's 
a perfect scenario to evaluate the protocol performance of the Mobile Ad Hoc 
Network, MANET.
I want to parse the replay of the game “StarCraft”, and export the 
entities traces into ns-format. Then the traces could be used in performance 
evaluation of MANET protocol, and could be helpful in developing more accurate 
mobility models. Many worthwhile works could be done after the first step, but 
I don't think it's a good idea to talk too much without doing anything.

Google is holding its Summer-Of-Code 2006 to support open source 
project[2]. Before applying for their financial support on my idea, I need find 
a proper mentor first.
*I wonder is there anyone who could be my project mentor and give me 
appropriate guide to implement this idea.*
It will not cost your too much time. In this movement, students are 
required to write project proposal and develop individually, while mentors 
should give advice about what to do, and check up whether students have 
finished the work after the movement this September. Besides, the mentor will 
be paid 500$ for their work, and I will commit all my codes to NS community.

If ( you agree that my idea is worthwhile  could guide me)
Please response me, and be my mentor;
else if ( you agree that my idea is worthwhile  cannot guide me)
Please give me some advice, and recommend someone else who 
could be my mentor if possible;
else
Just disregard this mail, and I am sorry to bother you :);

It is worth noting that the applying process will be end in 8th, May. 
In other words, the 8th, May is my deadline of finding a proper mentor. As a 
mentor, one should be experienced in reasearch of wireless/ad hoc network, 
and(or) development of ns2.

Any advice, help and recommend will be appricated deeply.

Look forward to hearing from you.

With my best regards,
--
Luo Gang

Reference
[1] Tracy Camp, Jeff Boleng, Vanessa Davies, A Survey of Mobility Models for Ad 
Hoc Network Research, Wireless Communication  Mobile Computing (WCMC): Special 
issue on Mobile Ad Hoc Networking: Research, Trends and Applications, vol. 2, 
no. 5, pp. 483-502, 2002.
[2] http://code.google.com/summerofcode.html



[ns] Otcl syntax problem - accessing properties on objects

2006-05-04 Thread Paul Kiddie

Hi all,

Just a quick newbie question to do with Otcl syntax - how do I access
properties on objects? for example in NS-2, wireless nodes $nodes are of
type 'MobileNode'. They have an ragent_ property on them (found out by
running the info Tcl command). So now how do I access ragent_ from
within the TCL script, I've tried $node ragent_ but this doesn't seem to
work. Even trying to access '$node random-motion' doesn't seem to work,
even though the command 'set $node random-motion 1' seems to work fine
for setting the property - but how about accessing it?

Any help would be greatly appreciated!
Many Thanks,
Paul

-

Paul Kiddie
1st Year PhD Electronic  Electrical Engineering
School of Electronic, Electrical  Computer Engineering, University Of
Birmingham, Edgbaston, Birmingham, B15 2TT



[ns] Relation Between CSThresh_, RXThresh_ , Distance, Pt_ and Reciever Sensivity in 802.11b

2006-05-04 Thread hamid reza

Hi All,
I have Static WLAN 802.11b Scenario. I used
TwoRayGround For Propagation.
I want to Calculate Good Positioning of My Nodes.
In Spec Tec of Real WLAN  802.11b Card we Have
Receiver Sensivity And Power Output.  I knew that
Power output Equal with Pt_.
But How can I relate Between other parameters.
Can Anyone Help me in this issue?


Best Regards
Hamid Reza


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Re: [ns] Usual Mistake

2006-05-04 Thread Sita S. Krishnakumar

Not bytes received - it is always an integer.
x/y should be typecasted to float to get correct answer.
use 4.0, 5.0 as someone else had replied.



 Hi,
 thanks for your response,
 I dont know Exactly but i think bytes recieved is
 integer.

 Regards
 Hamid Regards

 --- Sita S. Krishnakumar [EMAIL PROTECTED]
 wrote:

 Both formulas are the same and should give the same
 result.
 The difference you see in your example cases are due
 to the fact that all
 operations are integer. If you change it so as to do
 a float calculation,
 either formula will give the same result.
 Regards,
 Sita


 
  Hi All,
  Most  people used below instruction for
 calculating a
  bandwidth
  #Calculate the bandwidth (in MBit/s) and write it
 to
  the files
  puts $grfd $now [expr $bw1/$time*8/1024/1024]
 [expr
  $bw2/$time*8/1024/1024] [expr
 $bw3/$time*8/1024/1024]
 
  But I Think The Correct one is :
  #Calculate the bandwidth (in MBit/s) and write it
 to
  the files
  puts $grfd $now [expr $bw1*8/$time/1024/1024]
 [expr
  $bw2/$time*8/1024/1024] [expr
 $bw3/$time*8/1024/1024]
 
  I did this on ns
  set  x 5;
  set  y 2;
  puts   [expr $x/$y*8/2/2];
  output :4
  but
  set  x 5;
  set  y 2;
  puts   [expr $x*8/$y/2/2];
  output: 5
 
  Whay is your ideas?
 
  Best Regards
  Hamid Reza
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 





 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com





[ns] Question about CSMA in 802.11

2006-05-04 Thread ma hui


HI friends,

  I have a question about the behavior of Physical Carrier sensing in NS2. 


Can any one help me to clarify it?
 
According to my understanding, in the ns-2 code, physical carrier 
sensing is handled by a timer. When there is a packet with a received power 

higher than CST the timer is set to the end of that packet's transmission. 
Before the timer expires, the station assumes the channel is busy and can 
not start a transmission.


   My question is that:

   If there comes a new packet with a received power higher than CST 
before the timer expires, will ns-2 extend the timer of channel busy to the 

end of the second packet's transmission? or It just assumes the channel is 
idle when the previous timer expires?


Many Thanks,


Hui Ma
University of Washington

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  



Re: [ns] Simulating node failures

2006-05-04 Thread Dhammika Pathirana

Actually it seems like we can use error models for this, I guess there
should be some type of extension from generic error models to support
specific node errors.

Dhammika


On 5/3/06, Hai Nam [EMAIL PROTECTED] wrote:
 On 5/3/06, Dhammika Pathirana [EMAIL PROTECTED] wrote:
 
  Hi,
 
  What is the easiest way to simulate node failures (in wireless nets)
  in ns-2. I was trying to find a way to simulate node failures but I
  could not find any built in mechanisms for that. It seem like node
  failures are simulated by individual link failures. But then they are
  not the same.
 
  thanks
 
  Dhammika
 
 

 Hi,

 I'm working on a simulation of wireless networks, too. I was thinking
 about it before, but I've never read up on it. I think a simple (but
 not pretty) way to simulate a failed mobile node is to move it far
 away from the others.
 --
 Chào thân ái, With kind regards, Cordialement,

 Hai-Nam NGUYEN
 http://www.jcisio.com