[ns] How to select an agent among many agents attached to an application

2006-11-09 Thread k m
Hi I am trying to build a custom application. Consider the scenario when an application has to pick one TCP agent from a number of TCp agents to send the packet out. How will this be done using C++ in NS2. I mean how can I get the pointer to different agents. Please help me out.

[ns] how to get handles (pointers) to multiple agents from an application

2006-11-13 Thread k m
Hi I am working to develop this application that needs to talk to other applications. They all use tcp as their transport agent. When one node can talk to two other nodes, then it has two agents attached to it. Before settingup the ip addresses it has to select the agent (ie. agent_

[ns] Agent's recv() function

2011-05-20 Thread K. M.
Hello, I would appreciate if you can take a look at the following. I have the following simple topology: N0 - N1 -- N2 N0 sends FTP and CBR packtets to N2 throughout the simulation. I defined a new agent My_Agent and attached it on N1 (intermediate node). Its task is to drop both FTP

[ns] Adding new Classifier

2011-07-11 Thread K. M.
Dear all, I'm trying to add a new My_Classifier which inherits from AddressClassifier (in turn inherits from Classifier). However, I'm not allowed to override the recv() and find() functions of the Classifier object (AddressClassifier inherits these two functions from Classifier). Is there a

[ns] Bind float variable

2011-08-02 Thread K. M.
Hello all, How do I bind float variables? The following does not work: bind(float_var, float_var). Regards

[ns] Error: Cannot find variable

2011-08-30 Thread K. M.
Dear all, I have declared the following variable: set cbr(7) [new Application/Traffic/CBR] $cbr(7) attach-agent $udp(7) ...more code... Now, when I want to start the traffic the following works fine: $ns at $time_udp_start $cbr(7) start But the same command within a procedure i.e.: proc

[ns] Amount of traffic/monitor

2011-09-24 Thread K. M.
Dear all, Suppose I have the topology A - B - C in which A sends to C. One way to find the amount of traffic C receives is to set a B-C link monitor and measure the throughput. Is there another way to find out the amount of traffic C receives; I'm looking for a method invoked *from node C*

[ns] Argument passing

2011-11-15 Thread K. M.
Dear all, Argument passing can be achieved using the following command: ns otclfile arg But how do I use the argument within my .tcl file? For example something like: set myVariable arg.value Many Thanks.

[ns] warning: no class variable

2011-11-30 Thread K. M.
Hi all, I defined the following agent Main_Agent::Main_Agent() : Agent(PT_UDP) { ... bind(var_mainAgent, var_mainAgent); ... } I also defined the following agent which inherits from the previous My_Agent::My_Agent() : Main_Agent() { ...

[ns] evalf to change bound variable - termination problem

2012-08-16 Thread K. M.
Dear all, I have defined MyAgent (inherits from Agent) and MyClassifier (inherits from DestHashClassifier). MyClassifier has a bound integer variable var. I'm trying to change the value of var within MyAgent's C++ code. Here is part of my code (myagent.cc): ... 1. Tcl tcl = Tcl::instance();

[ns] DHCP implementation for Ns2

2007-10-01 Thread Brijesh K M
Hi, Is there a DHCP client/server/relay implementation in NS2. Thank You, - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more.