Sunday, February 8, 2009

[NS2] The difference between an instproc "compute-routes" and a C++ function "computes_routes()"

Two NS2 functions and instproc has very similar name: "compute-routes{}" and "compute_routes()". The differences are shown below:

compute-routes{}
  • is an OTcl command
  • is defined in class Simulator
  • is defined in file ~ns/tcl/lib/ns-route.tcl
  • populate routing information into nodes

compute_routes()
  • is a C++ function
  • is defined in class RouteLogic
  • is defined in file ~ns/routing/route.cc
  • computes the routing information for all pairs of nodes

For more information about Nodes and Route setup, 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/engineering/signals/book/978-0-387-71759-3

You may also find the following website useful:
http://www.ece.ubc.ca/~teerawat/NS2.htm

No comments: