Re: [ns] no class variable Tracefile::debug_

2011-04-04 Thread Manoj_Kumar



rainbow dd wrote:
> 
> warning: no class variable Tracefile::debug_
> see tcl-object.tcl in tclcl for info about this warning.
> 

I guess that by this time you must have obtained a solution, even though let
me share with you what I have found.
This error could have occurred when the variable debug_ which you have
binded in the class Tracefile has not been initialised or provided with a
value in your tcl script.

I received a similar error when trying to run a tcl script over an agent
(MyAgent) I have been using.
The error was something like:
warning: no class variable Agent/Myagent::myval_

I solved this problem by including the following line in my tcl script:
Agent/MyAgent set myVal_ 0

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/no-class-variable-Tracefile%3A%3Adebug_-tp21948143p31317010.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] [code omitted because of length] error

2011-03-20 Thread Manoj_Kumar



wee liang wrote:
> 
> why do i have a error when i run
> $./configure
> $./make clean
> $./make
> $make install
>  [code omitted because of length]
> : invalid command name "Agent/UDP/PDP"
> while executing
> "Agent/UDP/PDP set best_server_  0"
>  can any1 help? 
> 
If ubuntu, Just navigate to ns2.34 folder in Terminal and just run:
$sudo make clean && sudo make

if fedora, Just navigate to ns2.34 folder in Terminal and just run:
$su
# make clean && make


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/problem-sybil-attack-tp31141445p31193826.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Debugging ns code (.cc files) with print statements

2011-03-20 Thread Manoj_Kumar



Ns Learner wrote:
> 
> I had two copies of ns and I made changes to one of them. The PATH
> variable was pointing to the original ns folder. Whereas, I wanted to test
> the result of the changes made in the ns-copy folder. When I gave, ns
> file1.tcl, the original ns pointed out by PATH was being used. Hence, I
> could not see the effect of the changes although I was able to compile
> them successfully. To see which ns folder is being used, issue the command
> "which ns".
> 

Great that you came up with a solution!
On that note, I recommend NOT to install ns using the following command:
$sudo apt-get install ns

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Debugging-ns-code-%28.cc-files%29-with-print-statements-tp31140445p31193810.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] problem sybil attack

2011-03-16 Thread Manoj_Kumar



anand-29 wrote:
> 
> ...but i want
> make the node to drop only specified packets...like evry 3rd packet or
> half of the packets... :) :) :D
> 

See the ns-2 manual chapter on Error Models.

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/problem-sybil-attack-tp31141445p31165670.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Debugging ns code (.cc files) with print statements

2011-03-16 Thread Manoj_Kumar



Ns Learner wrote:
> 
> With cout, I get this error message:
> error: ISO C++ forbids declaration of ‘cout’ with no type
> error: expected ‘;’ before ‘<<’ token
> 

Do not use cout. Use printf instead.


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Debugging-ns-code-%28.cc-files%29-with-print-statements-tp31140445p31165658.html
Sent from the ns-users mailing list archive at Nabble.com.




Re: [ns] location or position of nodes

2011-03-16 Thread Manoj_Kumar



Suman paul choudhury wrote:
> 
> how is it possible to know the position of a node at any instant of a time
> if the node is  in constant motion. can any one provide with the tcl code
> of
> the following?
> 

This might help you:  http://wp.me/piGUb-IE http://wp.me/piGUb-IE 


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/location-or-position-of-nodes-tp31164555p31165527.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] dsdv protocol

2011-03-10 Thread Manoj_Kumar



Mubashir Rehmani wrote:
> 
> See this:
> http://masimum.dif.um.es/nsrt-howto/pdf/nsrt-howto.pdf
> 

This pdf is one the best contributions to the ns world. I feel very thankful
for its authors Francisco J. Ros and Pedro M. Ruiz and I also thank Mubashir
Rehmani for quoting this pdf.



-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/SPAN-protoccol-tp31112776p31118735.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] [tip] Obtaining Node Position and Energy Dynamically in NS2.34

2011-02-08 Thread Manoj_Kumar


Hi!
I have earlier noticed questions on how to calculate node position and
energy dynamically .
I began work on that and was able to obtain those parameters in few hours
work.
I have written an article on that. Hope it helps!
Link here: http://wp.me/piGUb-Ic

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/-tip--Obtaining-Node-Position-and-Energy-Dynamically-in-NS2.34-tp30879605p30879605.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] node color problem: my node just dont show color!

2011-02-08 Thread Manoj_Kumar



kylesartre wrote:
> 
> set node_(0) [$ns node]
> $node_(0) color red
> I tried changing the color to red/Red/green/Green/blue/Blue but nothing
> seems to be working
> 

The code should be like this:

$node_(3) color red
$ns_ at 2.5 "$node_(3) color red"

Here I have changed  node 3's  color to red at time 2.5.


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/node-color-problem%3A-my-node-just-dont-show-color%21-tp30837446p30876172.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Changing behaviour of node.

2011-01-31 Thread Manoj_Kumar



swat_nag wrote:
> 
> Im kind of new to ns2, i need help in changing the default working of the
> node. I dont know how to apply the changes to the code.
> 
> COnsider 3 nodes: A,B and C. C is like a router. A sends packet to B
> through C and B sends to A via C. In normal operation, when C gets the
> packets simultaneously, it sends one by one to A and after that to B (not
> at a time). But i want C to send both the packets simultaneously to A and
> B. Like this in the receiver end, A will XOR the received packets with its
> own packet so that it receives its required packet. B also does the same. 
> 
> Can u please tell me how to implement this?...and wat changes are to be
> made and where?... 
> I would really appreciate your help!
> 
In  short, you would want to implement the concept of Network Coding?

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Changing-behaviour-of-node.-tp30800274p30806623.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] How to disable a node

2011-01-30 Thread Manoj_Kumar



isenturk wrote:
> 
> I want to disable/shut down a node working in 802.11 network at a specific
> moment. "$node node-down" command works for 802.15.4 (WPAN) because it is
> defined at 802.15.4 mac layer but since it is not defined in 802.11 mac it
> throws tcl error for that. I couldnt find any other command for 802.11 Any
> ideas maybe different approaches please?
> 

Try disabling the link to a node. something like
$ns rtmodel-at 1.0 down $n1 $n2

then re-enable it as
$ns rtmodel-at 2.0 up $n1 $n2


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/How-to-disable-a-node-tp30802805p30803699.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] How to know previous node's ID

2011-01-26 Thread Manoj_Kumar



Do Thanh Binh wrote:
> 
>  I have a question about NS2. How can I know previous node 's ID base on a
> packet that it sent. I know there is a common header in each packet but
> fields prev_hop_, next_hop_.. do not contain this information. Can any
> body
> help me??
> 

If you just want to know the previous nodes id in a flow and you have no
idea of manipulating it, then think about obtaining it from the trace file
rather than inserting code in tcl or c++.

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/How-to-know-previous-node%27s-ID-tp30168297p30765877.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] how to calculate throughput from a trace file

2011-01-20 Thread Manoj_Kumar



Teena Sha wrote:
> 
> i have created a tcl file for a wireless network. and i am using booth TCP
> and UDP transmission . plese help me how to calculate throughput of this
> network. which filed i have to use to calculate throughput.
> 

A simple google search could give you the solution. You havent taken an
effort to do so. A mailing list should be the ultimate place to post your
queries when you haven't got the solution from other means.

Regarding your problem, you need to analyze the trace file generated to
calculate the throughtput.
Perl scripts to calculate throughput and other such tasks could be found
here: goo.gl/poQYs

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/how-to-calculate-throughput-from-a-trace-file-tp30716247p30717284.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] energy model

2011-01-20 Thread Manoj_Kumar



Subha Uthayaraj wrote:
> 
> "N -t 0.001920 -n 333 -e 999.83"
> How to analyze trace file in such case?
> How to identify sent received dropped packets?
> 

I googled on this topic for 15 minutes and I ended up with the following
solutions:

[1] Energy model update in ns2 
   http://goo.gl/Bm1T1

[2] Extensions to ns2 documentation(read page number 9 onwards)   
   http://goo.gl/hE5ic

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/energy-model-tp30717007p30717234.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] random delya

2011-01-19 Thread Manoj_Kumar




Akbar Hosseinkhani wrote:
> 
> In my c++ code I have written a piece of code which is used for random
> number generation:
> 

There is a tutorial for Random number generation in the TCL script[1]. It
may help you. The tutorial is in Chinese and the translated version is
linked here.

[1] http://goo.gl/fo2KI


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/random-delya-tp30702825p30706061.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Adding new Protocol to NS2

2011-01-18 Thread Manoj_Kumar



Ghassan Akrem wrote:
> 
> Thanks for replay., but the procedure in this link:
> http://elmurod.net/wps/?p=157
> I have many problems as shown in comments below it, and its not solved
> yet, I asked the writer but not got any solutions about, specially in
> modifying cmu-trace.cc file
> 

I came across this ppt[1] long back. Let me know if it helps you.
Earlier there seems to be some discussions on this topic[2]. Do search this
mailing list archives.
Some general tips related to your task could be found here[3].
Tips to implement a new routing agent are seen here[4].

[1] http://goo.gl/6znux
[2] http://goo.gl/b1dgp
[3] http://goo.gl/Nq6rZ
[4] http://goo.gl/dx8qG

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Adding-new-Protocol-to-NS2-tp30698522p30702330.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Adding new Protocol to NS2

2011-01-18 Thread Manoj_Kumar



Ghassan Akrem wrote:
> 
> I tried to add new protocol over my NS-2.34/ over Windows XP, I used some
> procedures available in Internet search, but got many errors. Any one did
> that successfully?
> Actually , I want to develop a new cwnd in my new protocol.
> 

This tutorial[1] provides a clear explanation on how to implement a protocol
in ns2. I hope this helps.

[1] http://elmurod.net/wps/?p=157


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Adding-new-Protocol-to-NS2-tp30698522p30698568.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Patched NS Make error

2011-01-17 Thread Manoj_Kumar



Christopher Ogirri wrote:
> 
>>For the downgrading I used the command:
>>rpm -Uvh -force *
>>I am using CentOS 5.4.
> 

oh Thank you!



Christopher Ogirri wrote:
> 
> Sorry about the attachement. I was not aware. My first time on a mailing
> list.
> 

ok :-)

-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Re%3A-Patched-NS-Make-error-tp30667645p30691265.html
Sent from the ns-users mailing list archive at Nabble.com.