Re: [ns] calculate mobility by using the parameters in setdest

2006-04-21 Thread Hajer FERJANI
Hi, Do you mean by mobility the speed of a mobile node? In this case, considering that -m and -M are the options to specify the minimum and maximum speed of nodes (I don't remember well setdest options), then setdest will dynamically assign to mobile nodes speed values ranging from 1 to 6 m/s. If

Re: [ns] When does packets learn source and destination mode IDs.

2006-04-21 Thread Hajer FERJANI
Hi Faisal, There's two possibilities to do that in ns. May be, in the examples you are referring to, source and destination agents responsible of generating packets are explicitely connected to each other in the tcl script, making one of them source of packets and the other its destination for all

Re: [ns] calculate mobility by using the parameters in setdest

2006-04-24 Thread Hajer FERJANI
= mnode_->speed(); > printf("The node speed is %g\n", speed); > return; > > } > > kind regards > Yahia > > > On Fri, 2006-04-21 at 12:25 +0200, Hajer FERJANI wrote: > > Hi, > > Do you mean by mobility the speed of a mobile node? > > In

Re: [ns] Can we change the transmission range of the node during the simulation?

2006-04-26 Thread Hajer FERJANI
Hi, You can change the nodes transmission range by changing the value of RXThresh_ of Phy/WirelessPhy by doing : Phy/WirelessPhy set RXThresh_ A separate C program is provided at ~ns/indep-utils/propagation/threshold.cc to compute the receiving threshold. You have to compile it, then you can us

Re: [ns] modify node no of nodes in tcl script codes

2006-04-26 Thread Hajer FERJANI
Hi, You can specify node movements using "setdest" utility, which will generate a file with initial positions and movements of the nodes. then you have to source this file in your tcl file. You can find more details in the ns_manuel about that. Bye. On 4/24/06, mohd hammad <[EMAIL PROTECTED]> wro

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 metho

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

Re: [ns] wireless ping broadcast questions

2006-05-12 Thread Hajer FERJANI
Hi Kathy, May be all you need is to assign a port number for the ping agent that you will use when sending packets in your c++ code. Then, in TCL script, you have to create ping agents and to attach them to nodes with this port number. Example : - In .h and .cc files: #define MY_PING_PORT 113

Re: [ns] mobile node communication range

2005-12-17 Thread Hajer FERJANI
Hi, To specify the communication range of wireless nodes, you should set an appropriate value of the receiving threshold in the network interface (in your tcl script), i.e Phy/WirelessPhy set RXThresh_ A separate C program is provided at ~ns/indep-utils/propagation/threshold.cc to compute the r

Re: [ns] Node id_

2006-01-13 Thread Hajer FERJANI
Hi, To have the current positions of a node you need to do : MobileNode* mnode_; double x = 0.0,y = 0.0,z = 0.0; mnode_->getLoc(&x, &y, &z); You should have mnode_ referencing to a node. For example, in my case I pass the node address to my agent in the tcl script and for this reason i defined

Re: [ns] how to reduce the signal range for a mobile node

2006-01-21 Thread Hajer FERJANI
Hi Dheepa, One way of reducing the signal range is to set an appropriate value of the receiving threshold in the network interface (in your tcl script), i.e Phy/WirelessPhy set RXThresh_ A separate C program is provided at ~ns/indep-utils/propagation/threshold.cc to compute the receiving thres

Re: [ns] delay for wireless link

2006-01-27 Thread Hajer FERJANI
Hi, You could may be set the parameter delay_ of link layer in your tcl script like this: LL set delay_ 10us Or you could add delay at application layer in your agent before sending or processing packets using timers. Hope it helps. Bye. On 1/27/06, bhaskar sardar <[EMAIL PROTECTED]> wrote: >

Re: [ns] Which parameters are accessable in script for wireless medium

2006-01-27 Thread Hajer FERJANI
Hi, May be you could replace : "set ww cwnd_" by " set ww [$your_tcp_agent tcl_method_to_return_cwnd] " where "tcl_method_to_return_cwnd" is a tcl method defined in the command() function of tcp class, which returns the cwnd_ param. Bye. On 1/27/06, dharmendra <[EMAIL PROTECTED]> wrote: > >

Re: [ns] Ping protocol in greis's tutorial

2006-01-27 Thread Hajer FERJANI
Hi Ramya, I'm using ns2.28 and I know that packet headers management changed a little bit so the Marc Greis Tutorial could not work anymore. Now, to add you new packet you have to : - add you packet name to the enum structure containing packet names in packet.h (under Common directory) (sorry I

[ns] How to disable tracing

2006-01-30 Thread Hajer FERJANI
Hello, I've tried to turn off the tracing bu doing in my tcl script : set AgentTrace OFF set RouterTrace OFF set MacTrace OFF But this does not work, I always get a trace file. Then I tried to comment the following line: $ns_ trace-all $tracefile but I get an error and could not execute the scr

Re: [ns] how do we define source and destination nodes in adhoc networks

2006-02-01 Thread Hajer FERJANI
Hi, You just need to do from your c++ code: Packet *pk = Packet::alloc(); struct hdr_cmn *chpk = HDR_CMN(pk); struct hdr_ip *ihpk = HDR_IP(pk); chpk->addr_type() = NS_AF_INET; ihpk->daddr() = dest; // the addr of the destination node ihpk->saddr() = my_index; //cur

Re: [ns] IP_BROADCAST problem

2006-02-07 Thread Hajer FERJANI
Hi Dan, May be you have to specify the address type in the common header as NS_AF_NONE. struct hdr_cmn *chpk = HDR_CMN(pk); chpk->addr_type() = NS_AF_NONE; ... Bye. Ps : This is the case for wireless networks, I don't know if it is the same thing for wired ones. On 2/6/06, Dan Jurca <[EMAIL P

Re: [ns] Location aware protocols in NS

2006-03-13 Thread Hajer FERJANI
Hi, To have current position of a node at agent level, you can do : MobileNode* mnode_; double x = 0.0,y = 0.0,z = 0.0; mnode_->getLoc(&x, &y, &z); You should have mnode_ referencing to a node. For example, in my case I pass the node address to my agent in the tcl script and for this reason