[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about node?



Dear K Sun

From: K Sun <[email protected]>
Subject: Questions about node?


> Hello, 
>       I just read the files: ns-node.tcl, node.h and node.cc .
> However, I do not know how many vars the class Node has and what 
> they are. I would like to know more about class Node. For example, what 
> is router_supp_ (in file, ns-node.tcl)? It should store the handle of a 
> node, but where the operaton (storing handle in it) occurs? In 
> addition, what does ifaces_ mean and where it has been defined?...
> Perhaps, I miss a file in which therecd  are answers of my question?
> 
>       When I read the file ns-lib.tcl, I find a command:
> set node [new [Simulator set node_factory_] $args]
>      I do not know what the node_factory_ is, what the effect of this 
> command and how this command operates.

I usually try to make the best use of [grep] command in unix shell.
When I try "grep factory */*.tcl" in ~ns/tcl directory,  I obtained following results:
----
porce.kaist.ac.kr porce:/home/porce/NS/ns-2.1b5/tcl> grep factory */*.tcl
ex/virtual-classifier.tcl:3:Simulator set node_factory_ VirtualClassifierNode
lib/ns-address.tcl:206: Simulator set node_factory_ HierNode
lib/ns-default.tcl:410:Simulator set node_factory_ Node
lib/ns-lib.tcl:195:     set node [new [Simulator set node_factory_] $args]
rtglib/route-proto.tcl:729:    Simulator set node_factory_ ManualRtNode
session/session.tcl:251:        set node [new [Simulator set node_factory_] $address]
test/test-suite-mip.tcl:74:    Simulator set node_factory_ Node/MIPBS
test/test-suite-mip.tcl:79:    Simulator set node_factory_ Node/MIPMH
test/test-suite-vc.tcl:21:        Simulator set node_factory_ VirtualClassifierNode
porce.kaist.ac.kr porce:/home/porce/NS/ns-2.1b5/tcl> 
----
So we can find node_factory can be a Node, or HierNode or MaualRtNode, or etc., which can be different according to the pertaining specific code.  Again, I usally use "grep" command. But I don't know whether there are other good approaches or not. If you find, plz don't hesitate to let me know. :)

In like manner, you will find out what "router_supp_" means. If you use ns2.b15, you may find this option is disabled...
and this option does NOT affect the operation of ns-node.tcl

> Best Regards,
>          Sun Kai 


Truly,

Jiwoong Lee @KAIST