5. Nodes and Packet Forwarding

This chapter describes one aspect of creating a topology in ns, , creating the nodes. In the next chapterChapterchap:links, we will describe second aspect of creating the topology, , connecting the nodes to form links.

Recall that each simulation requires a single instance of the Simulator../ns-2/tcl/lib/ns-lib.tcl to control and operate that simulation. The class provides instance procedures to create and manage the topology, and internally stores references to each element of the topology. We begin by describing the procedures in the class SimulatorSectionsec:node:simulator. We then describe the instance procedures in the class NodeSectionsec:node:node to access and operate on individual nodes. We conclude with detailed descriptions of the ClassifierSectionsec:node:classifiers from which the more complex node objects are formed.

The procedures and functions described in this chapter can be found in ~ns/tcl/lib/ns-lib.tcl, ~ns/tcl/lib/ns-node.tcl,
~ns/tcl/lib/ns-rtmodule.tcl, ~ns/rtmodule.{cc,h}, ~ns/classifier.{cc, h}, ~ns/classifier-addr.cc, ~ns/classifier-mcast.cc, ~ns/classifier-mpath.cc, and, ~ns/replicator.cc.

Tom Henderson 2011-11-05