Re: [ns] debugging in ns-2.34

2011-08-01 Thread мαłłi

http://www.isi.edu/nsnam/ns/ns-debugging.html

On 1 August 2011 14:07, shwta jain shwe...@sac.isro.gov.in wrote:


 Hi all,

 I want to debug ns-2 code(.cc files) in ns2.

 What is the procedure.

 Plz help me.



 Regards,

 Shweta Jain,






-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Malli [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok


Re: [ns] tcl : create nodes

2011-05-19 Thread мαłłi

Tami,

For your question my answer is
1. yes u got it, i forget to put s instead i put number thanks
2. yes we can do

The topology

n1 --- n2 --- n3 --- n4 --- n5

set requiredNodes 5
for {set i 0} {$i  $requiredNodes} {incr i} {
set n$i [$ns node]
if {$i == [expr $requiredNodex - 1]} {
$ns duplex-line $n[expr $i - 1] $ns$i 5Mb 2ms Drop Tail
} else {
$ns duplex-line $n$i $ns[expr $i+1] 5Mb 2ms Drop Tail
set tcp [new Agent/TCP]
$tcp set class_ 1
$ns attach-agent $n$i $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $n[expr $i+1] $sink
}
}

I didn't test the script, i generally wrote this one, please test it and let
me know status of this,
if you want specify specific bandwidth between the nodes, you manually
stored in a list
suppose *set bandwidth [ 2Mb, 3Mb, 4Mb, 5Mb, 0.2Mb] by using list index* we
can get the bandwidth
similarly what ever you need (specifically) that stored in a list and use
them

2011/5/17 Tami Nesher vessely...@gmail.com

 Thank you for all answers.
 1. Did you mean to write like this?(with s)
 set s 10
 for {set i 0} {$i  *$s*} {incr i} {

  set n$i [$ns node]

 2. I want also to create* links* between the nodes,  to *attach agents(tcp
 or  udp)* and *start them*.
  I need to do everey thing in the same way, with for ?
 ex.
 for {set j 0} {$j  $s/2} {incr j} {
  $ns duplex-link n$j n$s/2+$j 2Mb 10ms DropTail
 # Is it right to write like this?? and what can I do if I want to change
 the bandwidth sometimes?

 *Thank you!
 *

 On Tue, May 17, 2011 at 2:33 PM, мαłłi malli@gmail.com wrote:

 Tami,

 What I understand you question is you have an variable, based on that you
 need to create that much of users?
 Ex. set s 10
 for {set i 0} {$i  10} {incr i} {
  set n$i [$ns node]

 }


 On 17 May 2011 15:43, Tami Nesher vessely...@gmail.com wrote:


 Hi,
 How can I create nodes according to a variable number?
 I mean : I have a variable that contains the number of nodes that I need
 to
 create. How can I do it?




 --

 Thanks,

 The box said Requires Windows 95, NT, or better, so I installed Linux.

 Mallikarjun [:)]

 [image: YouTube] http://in.youtube.com/mallikv [image: 
 Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
 LinkedIn] http://www.linkedin.com/in/mallikarjunaraok




 --
 רבי משה בן מכיר זצל, מגדולי הראשונים כתב:
 מי שאומר את ברכת אשר יצר בכוונה, ומוציא כל מילה מפיו בקול רם וברור,  לא
 יבוא עליו שום חולי שבעולם, ולא יזדקק כלל לרופאים או לתרופות!







-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Malli [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok


Re: [ns] tcl: read parameters form file

2011-05-17 Thread мαłłi

yes Tami, the square brackets are used to variable substitution, similar to
= sign.

2011/5/17 Tami Nesher vessely...@gmail.com

 OK I found the problem. I should write: *puts* * [lindex $tcpFallowUDP 0]*

 Thank you.



 2011/5/17 Tami Nesher vessely...@gmail.com

 I change the line* puts $tcpFallowUDP* to *puts* * lindex $tcpFallowUDP 0
 *in order to print the  first argument in the list
 and I got this error:*
 *
 ~/ns-allinone-2.34/ns-2.34/v1/input$ ns input02.tcl
 bad argument 0: should be nonewline
 while executing
 puts lindex $tcpFallowUDP 0
 (file input02.tcl line 6)

 Why?



 On Mon, May 16, 2011 at 12:01 AM, мαłłi malli@gmail.com wrote:

 Nesher,

 It's already stored in a list tcpFallowUDP, please go through list
 command you understand very well.
 you want access first element lets* lindex $tcpFallowUDP 0 .. lindex
 $tcpFallowUDP nth* element.



 On 15 May 2011 13:16, Tami Nesher vessely...@gmail.com wrote:


 Hi, thanks ! it works.
  I just want to know how to save the numbers in *two *variables,
 instead of printing them. can you tell me how?

 2011/5/9 мαłłi malli@gmail.com

 Nesher,

 here the code, please let me know if i did any mistake

 set fid [open input.txt r]
 while {[gets $fid lineInfo] != -1} {
 regexp {.+: (\d+)} $lineInfo match one
 set tcpFallowUDP [lappend tcpFallowUDP $one]
 }
 puts $tcpFallowUDP


 On 8 May 2011 14:32, Tami Nesher vessely...@gmail.com wrote:



 here I attached the file. I need to read the numbers in tcl.

 On Sun, May 8, 2011 at 1:47 AM, ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed 
 teto...@yahoo.com wrote:

  send the file to show and try to help you
 
  --- On *Sun, 5/8/11, Tami Nesher vessely...@gmail.com* wrote:
 
 
  From: Tami Nesher vessely...@gmail.com
  Subject: [ns] tcl: read parameters form file
  To: ns-users@ISI.EDU
  Date: Sunday, May 8, 2011, 4:19 AM
 
 
 
  Hi,
  I need to read two parameters from file and save them as two
 variables in
  tcl script.
  the file needs look like this (for example):
  _: 10
  _: 20
  each line is one word, and I need to save the numbers.
  How can I do this?
  Thanks a lot if you have an answer.
 
 


 --
 רבי משה בן מכיר זצל, מגדולי הראשונים כתב:
 מי שאומר את ברכת אשר יצר בכוונה, ומוציא כל מילה מפיו בקול רם וברור,
  לא
 יבוא עליו שום חולי שבעולם, ולא יזדקק כלל לרופאים או לתרופות!




 --

 Thanks,

 The box said Requires Windows 95, NT, or better, so I installed
 Linux.

 Mallikarjun [:)]

 [image: YouTube] http://in.youtube.com/mallikv [image: 
 Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
 LinkedIn] http://www.linkedin.com/in/mallikarjunaraok




 --
 רבי משה בן מכיר זצל, מגדולי הראשונים כתב:
 מי שאומר את ברכת אשר יצר בכוונה, ומוציא כל מילה מפיו בקול רם וברור,
 לא יבוא עליו שום חולי שבעולם, ולא יזדקק כלל לרופאים או לתרופות!







 --

 Thanks,

 The box said Requires Windows 95, NT, or better, so I installed Linux.

 Mallikarjun [:)]

 [image: YouTube] http://in.youtube.com/mallikv [image: 
 Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
 LinkedIn] http://www.linkedin.com/in/mallikarjunaraok




 --
 רבי משה בן מכיר זצל, מגדולי הראשונים כתב:
 מי שאומר את ברכת אשר יצר בכוונה, ומוציא כל מילה מפיו בקול רם וברור,  לא
 יבוא עליו שום חולי שבעולם, ולא יזדקק כלל לרופאים או לתרופות!







 --
 רבי משה בן מכיר זצל, מגדולי הראשונים כתב:
 מי שאומר את ברכת אשר יצר בכוונה, ומוציא כל מילה מפיו בקול רם וברור,  לא
 יבוא עליו שום חולי שבעולם, ולא יזדקק כלל לרופאים או לתרופות!







-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Mallikarjun [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok

Re: [ns] tcl : create nodes

2011-05-17 Thread мαłłi

Tami,

What I understand you question is you have an variable, based on that you
need to create that much of users?
Ex. set s 10
for {set i 0} {$i  10} {incr i} {
 set n$i [$ns node]
}


On 17 May 2011 15:43, Tami Nesher vessely...@gmail.com wrote:


 Hi,
 How can I create nodes according to a variable number?
 I mean : I have a variable that contains the number of nodes that I need to
 create. How can I do it?




-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Mallikarjun [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok


Re: [ns] ffmpeg installation under Linux

2011-05-17 Thread мαłłi

Tami,

http://ubuntuforums.org/showthread.php?t=786095

go though this link i hope that will help,

On 15 May 2011 18:37, Tami Nesher vessely...@gmail.com wrote:


 Hi,
 I need to install ffmpeg on Ubuntu in order to do this: ./ffmpeg -i
 a01e.mp4
 a01e.yuv
 I got the error that there is no file called ffmpeg.
 it is right. I don't have it. someone can send me the file? or tell me
 where
 can I find it?




-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Mallikarjun [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok


Re: [ns] tcl: read parameters form file

2011-05-09 Thread мαłłi

Nesher,

here the code, please let me know if i did any mistake

set fid [open input.txt r]
while {[gets $fid lineInfo] != -1} {
regexp {.+: (\d+)} $lineInfo match one
set tcpFallowUDP [lappend tcpFallowUDP $one]
}
puts $tcpFallowUDP

On 8 May 2011 14:32, Tami Nesher vessely...@gmail.com wrote:



 here I attached the file. I need to read the numbers in tcl.

 On Sun, May 8, 2011 at 1:47 AM, ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed 
 teto...@yahoo.com wrote:

  send the file to show and try to help you
 
  --- On *Sun, 5/8/11, Tami Nesher vessely...@gmail.com* wrote:
 
 
  From: Tami Nesher vessely...@gmail.com
  Subject: [ns] tcl: read parameters form file
  To: ns-users@ISI.EDU
  Date: Sunday, May 8, 2011, 4:19 AM
 
 
 
  Hi,
  I need to read two parameters from file and save them as two variables in
  tcl script.
  the file needs look like this (for example):
  _: 10
  _: 20
  each line is one word, and I need to save the numbers.
  How can I do this?
  Thanks a lot if you have an answer.
 
 


 --
 רבי משה בן מכיר זצל, מגדולי הראשונים כתב:
 מי שאומר את ברכת אשר יצר בכוונה, ומוציא כל מילה מפיו בקול רם וברור,  לא
 יבוא עליו שום חולי שבעולם, ולא יזדקק כלל לרופאים או לתרופות!




-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Mallikarjun [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok


Re: [ns] Fw: ns2 installation error

2011-05-09 Thread мαłłi

Ehsan,

I think you try to give execution permission nam, try to change chmod +x to
nam (find location of nam)

On 8 May 2011 15:26, Ehsan Chaudhary ehsanchaudh...@ymail.com wrote:






 - Forwarded Message 
 From: Ehsan Chaudhary ehsanchaudh...@ymail.com
 To: ns-users@isi.edu
 Sent: Sunday, May 8, 2011 12:19:11
 Subject: ns2 installation error





 hi everybody. i just installed ns2.34 on fedora 14, validation was perfect,
 and
 when i try to simulate a tcl file by
 % ns  example.tcl

 i get following error

 Filtering ...
 running nam...
 ns: finish: couldn't execute nam: permission denied
while executing
 exec nam out.nam 
(procedure finish line 13)
invoked from within
 finish



 please help me how to remove this error
 thanks




-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Mallikarjun [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok


Re: [ns] XOR Tcl program required...

2011-05-08 Thread мαłłi

welcome yugesh,

Here a list converted into string example, we can many more using tcl

set msg1 0010101001010101010101010
set msg2 101010101010100001010

set msg1 [split $msg1 {}]
set msg2 [split $msg2 {}]
set s 0

for {set i 0} {$i  [llength $msg1]} {incr i} {
set temp [lappend temp [expr [lindex $msg1 $i]^[lindex $msg2 $i]]]
}
puts $temp

for {set i 0} {$i  [llength $temp]} {incr i} {
set s [concat $s[lindex $temp $i]]
}
puts List converted into string $s


On 9 May 2011 10:38, yugesh gowda yugeshgo...@gmail.com wrote:

 Thanks for your help..
 Its working properly..
 But i dont need any space between them..
 The output should like msg1.. no space in between 1s and 0s...
 Waiting for ur reply...








 On Mon, May 9, 2011 at 10:26 AM, мαłłi malli@gmail.com wrote:

 yes yugesh,

 ^ operator is used of XOR operation, you go thourgh tcl wiki it is very
 good one please refer this link http://wiki.tcl.tk/17464
 Math Operations on Binary Numbers: http://wiki.tcl.tk/21842


 set msg1 0010101001010101010101010
 set msg2 101010101010100001010

 set msg1 [split $msg1 {}]
 set msg2 [split $msg2 {}]

 for {set i 0} {$i  [llength $msg1]} {incr i} {
 set temp [lappend temp [expr [lindex $msg1 $i]^[lindex $msg2 $i]]]
 }
 puts $temp


 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0

 please let me know if i did any mistake.


 On 9 May 2011 09:26, yugesh gowda yugeshgo...@gmail.com wrote:


 Can any one help me with a tcl program that does XOR operation..
 For example consider two variables msg1 and msg2...
 set msg1 0010101001010101010101010
 set msg2 101010101010100001010


 Urgent




 --

 Thanks,

 The box said Requires Windows 95, NT, or better, so I installed Linux.

 Mallikarjun [:)]

 [image: YouTube] http://in.youtube.com/mallikv [image: 
 Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
 LinkedIn] http://www.linkedin.com/in/mallikarjunaraok





-- 

Thanks,

The box said Requires Windows 95, NT, or better, so I installed Linux.

Mallikarjun [:)]

[image: YouTube] http://in.youtube.com/mallikv [image:
Blogger]http://basicnetworktipsntricks.blogspot.com/ [image:
LinkedIn] http://www.linkedin.com/in/mallikarjunaraok