Re: [ns] flooding.tcl (hierarchical network)

2007-03-08 Thread Pedro Vale Estrela



Check my page http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html
about my address conversion functions

Pedro Vale Estrela


Type of Addresses that a node can have in NS2 (hAddr, ID, iAddr, Handle) 
In NS2, a node can be uniquely identified by several forms

the handle is the otcl name; it refers to an object of the form _oXXX,
and because of this, it is the only form can be used to directly call
internal instprocs and variables.
the haddr is the Hierarchical address, on the form X.Y.Z 
the iaddr is the INTEGER hierarchical address, where the haddr string is
simply ENCODED in a 32 bit integer.
the id is the sequential Node ID of the simulator.

The proposed variable names and contents are outlined in the following
table. 
For unknown nodes or in error conditions, the value -1 is generally used. 

http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html

In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all
possible conversions of each form, using the procs handle2iaddr,
handle2haddr, handle2id, etc. 




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of feel2chat
 Sent: quinta-feira, 8 de Março de 2007 20:52
 To: ns-users@ISI.EDU
 Subject: Re: [ns] flooding.tcl (hierarchical network)
 
 
 Will the problem was in a hierarchical network the addresses are
 represented
 as doted string (i.e. 0.8.1) so you need to convert the address to int in
 the script.
 
 to convert the address use something like this:
 
 set addressObj [[$ns get-AllocAddrBits ] get-Address]
 set ip [$addressObj str2addr $addr]
 
 cheers,
 Z
 
 On 2/25/07, feel2chat  [EMAIL PROTECTED] wrote:
 
  I have been trying to run the flooding.tcl example but using a
  hierarchical network (created using sgb2hierns), yet it didn't work.
 
  It seems the code does not find the right neighbour nodes, I wonder what
  I'm missing?
 
  The example work perfect on a flat network.
 
  Cheers,
  Z
 




[ns] flooding.tcl (hierarchical network)

2007-02-25 Thread feel2chat

I have been trying to run the flooding.tcl example but using a hierarchical
network (created using sgb2hierns), yet it didn't work.

It seems the code does not find the right neighbour nodes, I wonder what I'm
missing?

The example work perfect on a flat network.

Cheers,
Z