Re: [ns] new class

2010-12-14 Thread Teerawat Issariyakul
Hi If you would like to add a new module into NS2, please read http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com

Re: [ns] what does it means ???

2010-12-12 Thread Teerawat Issariyakul
est Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 12/12/2010, "El hadi Cherkaoui" wrote: > >Dear all , >

Re: [ns] Classifying Packets

2010-09-18 Thread Teerawat Issariyakul
Hi Rob, You can use packet classifiers in NS2. Please go through the following slides for the details. http://www.ns2ultimate.com/post/513029699/classifiers-a-multi-target-packet-forwarder Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http

[ns] Has function Tcl::error(...) been changed to be a private function?

2010-09-06 Thread Teerawat Issariyakul
, before publishing it online. Any comment would be appreciated. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat

Re: [ns] new block in simplelink structure?

2010-08-27 Thread Teerawat Issariyakul
-otcl-classes Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 8/24/2010, "pedro chaparro" wrote: >

Re: [ns] Test cwnd size for TCP variants

2010-08-16 Thread Teerawat Issariyakul
uot; } Feel free to adjust it yourself. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 8/15/2010, "Ghassan Akre

Re: [ns] how to install ns 2.26

2010-08-14 Thread Teerawat Issariyakul
/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 7/30/2010

Re: [ns] Error: "no-slot{} default handler"

2010-08-14 Thread Teerawat Issariyakul
rror Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 8/12/2010, "sajad m" wrote: > >I'm trying to t

Re: [ns] linkage Otcl/C++

2010-07-12 Thread Teerawat Issariyakul
, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 7/8/2010, "hend baklouti" wrote: > >hello, >i'm a begi

Re: [ns] monitor-queue activation problem

2010-07-11 Thread Teerawat Issariyakul
eue. If you would like to learn how to read OTcl error message, please read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear

Re: [ns] Fw: Re: Error 127

2010-07-11 Thread Teerawat Issariyakul
/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 7/11/2010, "ikenna

Re: [ns] target on tcp implementation

2010-07-05 Thread Teerawat Issariyakul
Hi Pedro, TcpAgent uses function send(p,h) from within function "TCPAgent::output(int seqno, int reason)" rather than target_-> recv(p,h) Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitt

Re: [ns] NS2 basic execution

2010-06-21 Thread Teerawat Issariyakul
Hi, Usually, you don't need to know where the main() in C++ is. This is because you start simulation in Tcl, not in C++. If you are curious, the function main is located in the following file: ns-2.35/ns_tclsh.cc Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/

Re: [ns] the recv() in routing protocol process one packet at a time or multiple?

2010-06-11 Thread Teerawat Issariyakul
Hi, NS2 is a single-thread program. It processes one thing at the time. This is also true for function recv() which process one packet at a time. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com

Re: [ns] what is this error?

2010-05-05 Thread Teerawat Issariyakul
Hi Pedro, Perhaps, you might want to read the following post about no-slot error: http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http

Re: [ns] comand to know time?

2010-05-05 Thread Teerawat Issariyakul
Hi Pedro, You can use $ns now Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 5/5/2010, "pedro chaparro&qu

Re: [ns] seeds in ns

2010-04-25 Thread Teerawat Issariyakul
Hi Manoj, You might want to read the following blog post. I just put it up today. http://www.ns2ultimate.com/post/550010284/introducing-randomness-into-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http

Re: [ns] NS2/mannasim on ubuntu 9.04 or GCC version 4.3.3

2010-04-25 Thread Teerawat Issariyakul
/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/23/2010

Re: [ns] Installing problem

2010-04-15 Thread Teerawat Issariyakul
/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/15/2010, "

Re: [ns] ns use-newtrace question about new trace format

2010-04-15 Thread Teerawat Issariyakul
Hi Jin, Maybe you want to check out this page http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t

Re: [ns] add a new protocol to ns

2010-04-14 Thread Teerawat Issariyakul
Hi, If you have a new module you would like to add to NS2, please go to http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 I hope it will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul

Re: [ns] problem: Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl)

2010-04-14 Thread Teerawat Issariyakul
Hello Meriem, I just put up a "no-slot error" on the following link. http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error It might solve your problem. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/35

Re: [ns] how to find the no of packet drops

2010-04-13 Thread Teerawat Issariyakul
Hi Krishna, I would use single null agent for the simulation. Then I would go to modify the null agent to count packet every time it receives a packet. At the end of simulation, have it print out all received packets. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http

Re: [ns] Error installing NS2 (tclcl make failed)

2010-04-13 Thread Teerawat Issariyakul
/441093095/ns-2-35-works-on-cygwin I get ns-2.34 working on Ubuntu 8.04. But I'm not sure about ns-2.29. I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Tee

Re: [ns] How to call one function out of 2, using set nd [ns node] ???

2010-04-13 Thread Teerawat Issariyakul
HI Learner, Instproc Simulator::node is just a way to create a basic node. If you want a fancy node of your own, you can define another instproc Simulator::my_node. At the Tcl simulation script, you can do something like set mynode [$ns my_node] Best Regards, Teerawat Issariyakul http

Re: [ns] Error while running the tcl script while implementing a new protocol in ns2

2010-04-13 Thread Teerawat Issariyakul
read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On

Re: [ns] Segmentation Fault while Modifying AODV

2010-04-12 Thread Teerawat Issariyakul
Hi Rasheed, Segmentation fault is usually due to memory access violation. A common example is as follows. int x[10]; x[20] = 0; where you create an array x with 10 slots, but try to access 20th slot of x. Hope this will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com

Re: [ns] ns2 installation problem....

2010-04-12 Thread Teerawat Issariyakul
/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/12/2010

Re: [ns] wireless tcl script true but the trace file hasn't the same format as for wireless script

2010-04-12 Thread Teerawat Issariyakul
Hi Emma, You are using a new trace format. Please refer to http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats for more information. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear

Re: [ns] Graphs in ns2

2010-04-10 Thread Teerawat Issariyakul
Hi Nikitha, I've never use XGraph. I only use Matlab. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/10

Re: [ns] segment fault

2010-04-09 Thread Teerawat Issariyakul
Hi Stalin, Segmentation fault is usually due to memory access violation. A common example is as follows. int x[10]; x[20] = 0; where you create an array x with 10 slots, but try to access 20th slot of x. Hope this will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com

Re: [ns] Problem when i am using TCL with awk

2010-04-06 Thread Teerawat Issariyakul
Hi Umang, I find the following AWK website pretty useful. You might want to check it out. http://www.vectorsite.net/tsawk.html Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t

Re: [ns] Fwd: help...

2010-04-06 Thread Teerawat Issariyakul
Hi Sushma, These two versions are quite outdated. The latest one is 2.35. I installed in on Cygwin. It also works on Ubuntu as well. Here is the instruction: http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http

Re: [ns] ns-default.tcl ???

2010-04-06 Thread Teerawat Issariyakul
HI Pedro, There is only one role for ns-default.tcl: Setting the initial values for OTcl variables which are bound to C++. There is no other roles for this file. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http

Re: [ns] Optimizing Cygwin install size?

2010-04-05 Thread Teerawat Issariyakul
Hi Tim, My installation is only about 1.7G. You might have to selected only Cygwin package that you need. Do not install everything. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com

Re: [ns] Installing ns-2.28, 2.29 under Gentoo or Ubuntu

2010-04-04 Thread Teerawat Issariyakul
4-and-perhaps What you can do is to use NS-2.35 which fixed the gcc problem. Please find the instruction here: http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417

Re: [ns] Problem with using ./configure command in ns2 while recompiling ns2

2010-03-29 Thread Teerawat Issariyakul
Hi the learner, >From what I can see, the error is due to class Agent/MyAgentOtcl is not define. If you are not familiar with how to read Tcl error message, please read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Wishes, Teerawat Issariyakul h

Re: [ns] Reg Timer Handler Functions

2010-03-28 Thread Teerawat Issariyakul
so find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.

Re: [ns] Fwd: SUB: Reg getting this NS2 code working

2010-03-28 Thread Teerawat Issariyakul
Hi Venkata, If you are new to NS2, I suggest you to read the following blog. http://www.ns2ultimate.com/post/434349586/for-ns2-newbies It provides the fundamental steps in learning NS2. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat

Re: [ns] NS2.33 installation

2010-03-26 Thread Teerawat Issariyakul
HI Meriem, I posted the installation of NS-2.35 below: http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin You should move to the latest version of NS2. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul

Re: [ns] Is common header a must in a packet and address type defined in config.h

2010-03-25 Thread Teerawat Issariyakul
Hi The Learner, It is not a must. The header is just a place where you can store information. It's fine to create your own type. What you have to do is to tell the routing module to extract the address from "your" address variable. Best Wishes, Teerawat Issariyakul http://www.

Re: [ns] Common header definition inside ns2 directory

2010-03-22 Thread Teerawat Issariyakul
Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/23/2010, "The Learner" wrote: > > >Hi. > >Can there be mult

Re: [ns] Common header definition inside ns2 directory

2010-03-22 Thread Teerawat Issariyakul
Hi, It's in the file ns-2.35/common/packet.h. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/22/2010,

Re: [ns] EXEC error????

2010-03-21 Thread Teerawat Issariyakul
Hi Pietro, Here is my suggestion. If you are sure that "tcp_bt.tcl" is correct, try to run the following ns tcp_bt.tcl 1 ns tcp_bt.tcl 2 ns tcp_bt.tcl 3 ... Keep changing the last number until it hits 15. Does it create any error? Best Regards, Teerawat Issari

Re: [ns] "error when calling class $cls: $args"

2010-03-19 Thread Teerawat Issariyakul
e following blog post. http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http:

Re: [ns] Make file

2010-03-19 Thread Teerawat Issariyakul
Hi Learner, The default make file is "Makefile" with no extension. If you would like to add a new protocol. You can find the instruction on the post below: http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 Best Regards, Teerawat Issariyakul http://www.ns2ul

[ns] [ns: Adding new NS2 modules] Re: reg : Linking errors

2010-03-17 Thread Teerawat Issariyakul
ncluding-new-modules-into-ns-2 I hope it'll help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/15/2010, "

Re: [ns] ns-2.34 installation problem

2010-03-11 Thread Teerawat Issariyakul
Hi Tom, Thanks for your comments. I finally got to to work. NS-2.35 really works under cygwin!! I also publish the step-by-step installation at the following URL. http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com

[ns] ns-2.34 installation problem AND "the working Solution"

2010-03-10 Thread Teerawat Issariyakul
. Problem: http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps Solution: http://www.ns2ultimate.com/post/425358640/ns2-windows-7-and-cygwin-1-7-what-a-nightmare Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat

Re: [ns] ns-2.34 installation problem

2010-03-10 Thread Teerawat Issariyakul
hat I set up a Ubuntu box inside a VMware running on Windows 7. It's a bit of hassle but it works. I will put the instruction up on my blog soon. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/8/201

[ns] For NS2 Newbies (Re: Implementing a new protocol in NS2)

2010-03-08 Thread Teerawat Issariyakul
know where you are now. Please visit the blog post: http://www.ns2ultimate.com/post/434349586/for-ns2-newbies I hope it will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/6/2010, "Teerawat

Re: [ns] Implementing a new protocol in NS2

2010-03-06 Thread Teerawat Issariyakul
95 You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/6/2010, "The Learner" wrote:

Re: [ns] ns-2.34 installation problem

2010-03-05 Thread Teerawat Issariyakul
Here is my main question: Where do you get Cygwin 1.5.25. Thanks, Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/5/2010, "Lupe Krops" wrote: > >Hi to everyone, > > >I'm trying t

Re: [ns] [Suggestion for your question]: help!!! Adding new protocol in NS2

2010-02-28 Thread Teerawat Issariyakul
http://www.ece.ubc.ca/~teerawat/NS2.htm BR, Best Regards, Teerawat Issariyakul http://www.ece.ubc.ca/~teerawat http://t-issariyakul.blogspot.com http://ns2ultimate.tumblr.com/ (Beta) Hello NS Users, I installed ns2.34 allinone in ubuntu 9.10. And first time, I am trying to add a

Re: [ns] randomizing runs

2009-09-27 Thread Teerawat Issariyakul
Hi Abu, By default, NS2 is deterministic. If you would like to run NS2 in randomized scenarios, you need to execute $defaultRNG seed prior to "$ns run", where is an integer. If is zero, NS2 will use the current time and counter as a seed for random number generator. By default, is set to "

Re: [ns] Please Help

2009-09-23 Thread Teerawat Issariyakul
Hi, You may run "make" again from NS2 directory. It will create ns.exe. Best Regards, Teerawat On 9/22/2009, "Sula K" wrote: > >Daer my brothers, > >in ns 2  I did rm ns.exe instead rm nam.exe , > >after that when  iexcuted the following problem come out on the screen? > >u...@user-cfab0b1f5

Re: [ns] how to modify tcp

2009-06-04 Thread Teerawat Issariyakul
Dear Vaishali, NS2 has two versions of SACK: Agent/TCP/Sack1 and Agent/TCP/SackRH. Check out the details in files ~ns/tcp/tcp-sack1.* and tcp-sack-rh.* BR Teerawat On 6/4/2009, "vaishali mandhare" wrote: > >hello all, >I want to increase performance of tcp in maodv but I cant do, instead 

Re: [ns] what means these lines

2009-05-29 Thread Teerawat Issariyakul
Dear Rania, These are basic Tcl language. You may have a look at the following books. - T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator NS2", Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 - [C. Flynt, “Tcl/Tk: A developer guide,” Morgan Ka

Re: [ns] TCP agent and sink

2009-05-28 Thread Teerawat Issariyakul
packets from >both the sources will go regardless of transmission from other end..?? > >On Wed, May 27, 2009 at 9:56 PM, Teerawat Issariyakul >wrote: > >> >> Dear Vishal, >> >> Only one sink is necessary. But you do need to connect both tcp agent to >> the

Re: [ns] TCP agent and sink

2009-05-27 Thread Teerawat Issariyakul
Dear Vishal, Only one sink is necessary. But you do need to connect both tcp agent to the same sink by using "$ns connect $tcp1 $sink" and "$ns connect $tcp2 $sink". The result would be the same as when you have two sinks. Best, Teerawat On 5/27/2009, "Vishal Agarwal" wrote: > >Hello users,

Re: [ns] A problem about the length of a queue

2009-05-25 Thread Teerawat Issariyakul
Well, what you can do is to write a function, say lengthb()) in class PacketQueue (there is a variable pq_ of class Queue). In this function, determine the number of bytes of each packet from head_ to tail_ of a PacketQueue object and returns the total number of bytes. I posted how to determine

Re: [ns] Help on ns2 internal organization

2009-05-10 Thread Teerawat Issariyakul
Hi Qweq, I agree with you when you change C++ code you WILL NEED to recompile it. But, Udit, if you want to change topology, you will not need to modify C++ code. You can do it in Tcl. Defining your own topology in Tcl does not require recompilation. In fact, there is no Tcl compiler. Tcl is jus

Re: [ns] to pass message class application to agent

2009-04-29 Thread Teerawat Issariyakul
Dear Gisane, NS2 defines applications in class Application (see ~ns/apps/app.h,cc). The derive classes of application are for example TrafficGenerator (e.g., CBR) or FTP. The application models user demand. Therefore it need to send message to an agent saying that a use needs to send data. Here

Re: [ns] ns problem1

2009-03-15 Thread Teerawat Issariyakul
You need to install XServer. Go to website of Cygwin or google to find out how. Best, Teerawat On 3/15/2009, "ali bala" wrote: >hi >i had problem with nam (i worke with ns-2 under cygwin) >i did this steps for troubleshooting untill now : >  >while running simple example programs, I get error

Re: [ns] Packet dropping with multiple agents

2009-03-15 Thread Teerawat Issariyakul
The packet can be dropped due to several reasons such as packet transmission error (even though the nodes are close), or buffer overflow. I think you need to check whether the packets are dropped due to buffer overflow. Best, Teerawat On 3/14/2009, "Arslan Munir" wrote: > >Hi all, > >I have t

Re: [ns] How to Drop Packets From a Particular Sender

2009-03-13 Thread Teerawat Issariyakul
t disappear and the logs would not be >consistent. I would recommend using the latter method > >drop(p) > >instead. This makes the logging consistent and almost all objects I've come >across where I would like to drop packets have been Connector objects. > >Bes

Re: [ns] How to Drop Packets From a Particular Sender

2009-03-13 Thread Teerawat Issariyakul
Hi, Suppose you have a pointer "p". You can drop the packet by executing Packet::free(p) Also the packet "*p" can be dropped from within the Connector object by invoking function drop as follows: drop(p); Note that "drop(p)" is a function of class Connector, and therefore must be i

Re: [ns] Classifier no slot.

2009-03-12 Thread Teerawat Issariyakul
On 3/12/2009, "Mayank Daga" wrote: Hi, Basically, you are accessing the slot -1 which does not exist. I posted the details at http://t-issariyakul.blogspot.com/2009/03/no-slot-error-for-classifiers.html For more information about Classifiers, see Chapter 6 in the following book from Springer:

Re: [ns] ns problem

2009-03-11 Thread Teerawat Issariyakul
Hi, Basically, you are accessing the slot -1 which does not exist. I posted the details at http://t-issariyakul.blogspot.com/2009/03/no-slot-error-for-classifiers.html For more information about Classifiers, see Chapter 6 in the following book from Springer: T. Issaraiyakul and E. Hossain, "I

Re: [ns] Classification decision and node id

2009-03-02 Thread Teerawat Issariyakul
Dear Thanes, You may find the answer about classifier at http://t-issariyakul.blogspot.com/ For more information about Classifiers, see Chapter 6 in the following book from Springer: T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator NS2", Springer 2008. http://www.springer.com

Re: [ns] ARQ implementation for terrestrial links

2009-01-11 Thread Teerawat Issariyakul
Dear Ioanis, There is an example implementation of ARQ in the following book from Springer useful. T. Issariyakul and E. Hossain , "Introduction to Network Simulator NS2," Springer, Oct. 2008, ISBN: 978-0-387-71759-3 http://www.springer.com/engineering/signals/book/978-0-387-71759-3?detailsPag

Re: [ns] Packet Arrival rate -- Need Help*

2008-11-12 Thread Teerawat Issariyakul
Dear LiViAn, What do you mean by packet arrival rate? Arrive at the queue, or from the source? Does it need to pertain to a certain TCP flow? Best, Teerawat On 11/12/2008, "LiViAn ZaH" <[EMAIL PROTECTED]> wrote: > > > >if (typeof YAHOO == "undefined") { > var YAHOO = {}; >} >YAHOO.Shortcuts =

Re: [ns] Packet Arrival rate -- Need Help*

2008-11-12 Thread Teerawat Issariyakul
Dear LiViAn, What do you mean by packet arrival rate? Arrive at the queue, or from the source? Does it need to pertain to a certain TCP flow? Best, Teerawat On 11/12/2008, "LiViAn ZaH" <[EMAIL PROTECTED]> wrote: > > > >if (typeof YAHOO == "undefined") { > var YAHOO = {}; >} >YAHOO.Shortcuts =

Re: [ns] How to send a packet to previous node

2008-11-11 Thread Teerawat Issariyakul
But unfortunately in IFQ can't access routing >object's functions. > >any way, thanks a lot of ur reply. > >Howard > >2008/11/11 Teerawat Issariyakul <[EMAIL PROTECTED]> > >> >> Dear Howard, >> >> The easiest way to transmit from one N

Re: [ns] How to send a packet to previous node

2008-11-11 Thread Teerawat Issariyakul
Dear Howard, The easiest way to transmit from one NsObject (e.g. Nodes) to another is through a (C++ and Tcl) Connector object. A connector has two pointers to NsObjects: target_ and drop_. In the OTcl domain, it uses an OTcl commands "target" and "drop" (followed by the name of the NsObject) to

Re: [ns] how to implement extension to NS2

2008-11-07 Thread Teerawat Issariyakul
You may look at the following book from Springer. T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator NS2", Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~

Re: [ns] where is the packet header offset set when a new packet is generated?

2008-10-31 Thread Teerawat Issariyakul
Packet construction is fairly subtle. In fact it consist of three phases: 1) At the compilation (when you type "make"): In this phase, NS2 allocate the memory for all TclClasses. PacketHeaderClass defined in file ~ns/common/packet.h,cc is one of them. In the constructor of this class, the sizeof

Re: [ns] How to measure rate of the traffic

2008-10-30 Thread Teerawat Issariyakul
Hi, What UDP does is to create packets based on the application. Under your scenario, Pareto tells UDP when to create a packet, and UDP will create the packet accordingly. Therefore the rate of UDP is equal to the rate at which the Pareto traffic is generated. Best, Teerawat On 10/29/2008, "J

Re: [ns] are there any TCP traffic models or generators on ns2?

2008-10-29 Thread Teerawat Issariyakul
Hi, TCP itself cannot generated traffic. It receives a demand for data transmission from a user. For example, you may use FTP and indicate that a user has infinite demand to transfer data. TCP then takes that demand and keep transmitting packets (practically forever). If you want to create your

Re: [ns] Generating packets on queue events

2008-10-29 Thread Teerawat Issariyakul
Hi, In NS2, generating a new packet is not that complicated. Class Packet has a function alloc() which returns a pointer to the created packet. You may find the detail in file ~/ns/common/packet.h. At the receiving end, you may process the packet in the function recv(p,h), where p is a pointer

Re: [ns] Problems with FEC, Poisson and Errmodel

2008-10-28 Thread Teerawat Issariyakul
Hi, I guess you may look at chapters 11-12 the following book from Springer: T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator NS2", Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide use

Re: [ns] What is Packet Interval !!

2008-10-28 Thread Teerawat Issariyakul
Hi, If you are talking about the time that you need to transmit packet, it is actually defined by two things 1) packet size and 2) link characteristics. There is a detailed explanation of the packets and the scheduling (and timers) in the book from Springer: T. Issaraiyakul and E. Hossain, "In

Re: [ns] ns-2 simulation verification

2008-10-28 Thread Teerawat Issariyakul
Well, Most of the time, you will have to see if the results make senses. But for a good research, you will need analytical results as a comparison. Regards, Teerawat On 10/27/2008, "Ghada Khoriba" <[EMAIL PROTECTED]> wrote: > >Dear all, > >How can I verify that the simulation results is right

Re: [ns] How to perform actual data transmission in NS2?

2008-10-21 Thread Teerawat Issariyakul
Dear Ying, In fact, NS2 can transmit actual data. But NS2 does not usually transfer the entire file because it does not have to. What NS2 does is to specify the file size and simulation the time that the time that the entire file is received (of course there are details that I omit to say here).

Re: [ns] How to access mac layer in c++ of ns2

2008-10-17 Thread Teerawat Issariyakul
Hi Basim, The connection from a node to a TCP agent is fairly subtle. Basically, a Node has an instvar dmux_ which is a classifier. It install a TcpAgent and TcpSink in the "slot" of the classifier dmux_. This occurs when you invoke commands like $ns attach-agent $n0 $udp0 You may find the det

Re: [ns] Gettig error in simulation (ABORTING...)

2008-01-26 Thread Teerawat Issariyakul
Hi Sayed, There must be something wrong in your program. NS2 has a bunch of integrity checks. If there is something wrong (e.g., deallocating a packet that does not exit), it will abort the program by invoking function abort(). BR, Teerawat On 1/27/2008, "Seyed Amin Hosseini Seno" <[EMAIL PROTE

Re: [ns] target_ ->recv ()

2007-11-14 Thread Teerawat Issariyakul
Well, It is if you just implement the codes like that. In most cases, however, you will not instantiate an object from class Connector. You will implement a class derived from class Connector. In the derived class, you will also have to override function recv. For example, you can invoke functi

Re: [ns] access to TCL instance variables

2007-11-06 Thread Teerawat Issariyakul
Nabila, To print the value, you may do something like puts [$myagent set myvar_] Cheers, Teerawat On 11/6/2007, "Nabila khedimi" <[EMAIL PROTECTED]> wrote: > >This is what I did, we can set a value to the variable like you did but how to >get its value, for printing for example > >> To: [E

Re: [ns] access to TCL instance variables

2007-11-06 Thread Teerawat Issariyakul
Hi Nabila, First of all, you need to bind your OTcl class Agent/MyAgentOtcl to, for example, MyAgent. Secondly, suppose you need to access variable my_var_ of class MyAgent. You need to bind this variable to the OTcl domain. This can be done in the constructor: MyAgent:MyAgent() { bind("my_

Re: [ns] Monitors or Traces??

2007-10-18 Thread Teerawat Issariyakul
Dear Jamal, Trace is actually designed to track packet. It records the detail of packets which pass through predefined checkpoints in a network. Monitor is usually use to collect statistic. It consists of snoop queue which is attached in front of a queue. Every time a packet pass through a snoo

Re: [ns] recompiling NS-2

2007-10-16 Thread Teerawat Issariyakul
Hey You have to include object files (*.o) for TCP westwood into Makefile and run "make" again. Here is how you include it. In the Makefile, you should see, OBJ_STL = diffusion3/lib/nr/nr.o diffusion3/lib/dr.o \ diffusion3/filters/diffusion/one_phase_pull.o \ ... packmim

Re: [ns] Make failed: Command commence before first target ??!!?

2007-09-30 Thread Teerawat Issariyakul
Perhaps you can show use Lines 247-253, for example. It will be easier to analyze the problem. One more thing. Is the Makefile still running ok when you remove your own object file? BR, Teerawat On 9/29/2007, "Ghada Al-Mashaqbeh" <[EMAIL PROTECTED]> wrote: > >I did not forget it, but now the p

Re: [ns] Segmentation Fault

2007-09-30 Thread Teerawat Issariyakul
Segmentation fault is usually caused by programming error. For example, you define an array int x[10]; Then the statement x[11] = 0; would cause segmentation fault. you have to debug the program in order to solve this. Good Luck Teerawat On 9/30/2007, "Faraz Siddiqui" <[EMAIL PROTECTED]> wr

Re: [ns] How to recompile and run tcl files?

2007-09-13 Thread Teerawat Issariyakul
Say you want to include myfile.cc into NS2 code, you have to incorporate myfile.o in file Makefile Open Makefile and look how an object file (myfile.o) can be incorporate into the Makefile. Finally, run "make" at ns2 directory, and you're done!! Best, Teerawat On 9/13/2007, "Kavuluri, Mal

Re: [ns] printing the ackno

2007-09-05 Thread Teerawat Issariyakul
Hi, A one-way TCP does not use field ackno_. Instead, the TCP Sink creates an ACK packet by placing ACKNO in the field seqno_ of the ACK packet. So you just need to print out field seqno_ but you have to make sure that the corresponding packet is an ACK number. Cheers, Teerawat On 9/4/2007,

Re: [ns] throughput calculation>>>>>>>>>>>>>>>>>

2007-08-31 Thread Teerawat Issariyakul
Hi, There are several ways to compute throughput. If you use TCP, the simplest way is to measure the sequence number and divide it by simulation time. You add the following into your simulation script ... $ns at 10.0 "$ftp stop" $ns at 10.1 "puts "puts \"The final TCP sequence number is [$tcp s

Re: [ns] warning:no class variable Trafficfile::debug_

2007-08-31 Thread Teerawat Issariyakul
Hi, I think your problem may be caused by 1. You did not bind variable debug_ to the OTcl domain. Go to the Class TrafficFile and see whether the variable debug_ is bound properly. 2. Class TrafficFile does not have the variable debug_ at all. In this case, you have to declare it in Class Traf

Re: [ns] Ns2 problem in tclsh

2007-08-30 Thread Teerawat Issariyakul
Hi Does ns start at all? From my understanding, its like ns works properly. But the variable "ns" is not used properly. Try to replace "ns" with "$ns" if you ever define "set ns [new Simulator]". The former one is just a string while the latter one is the simulator object. cheers, Teerawat On

Re: [ns] tcl script

2007-08-23 Thread Teerawat Issariyakul
Hi, I suggest you to go thru NS2 FAQ http://www.isi.edu/nsnam/ns/ns-faq.html and NS2 tutorial (e.g., http://www.isi.edu/nsnam/ns/tutorial/index.html) before posting your question in the mailing list. BR, Teerawat On 8/22/2007, "wathig dawelbait" <[EMAIL PROTECTED]> wrote: > >hi I am new in u

[ns] Replying Etiquette

2007-08-18 Thread Teerawat Issariyakul
Hi All, I am just wondering about this mailing list. There are a lot of questions in this list. Suppose that some of us know the solution and would like to help out. Do we suppose to "REPLY" to the sender only or "REPLY ALL" so that others who have similar problems will know the answer too ? C

  1   2   >