The trace support in OTcl consists of a number of specialized classes visible in OTcl but implemented in C++, combined with a set of Tcl helper procedures and classes defined in the ns library.
All following OTcl classes are supported by underlying C++ classes defined in ~ns/trace.cc. Objects of the following types are inserted directly in-line in the network topology:
| Trace/Hop | trace a ``hop'' (XXX what does this mean exactly; it is not really used XXX) |
| Trace/Enque | a packet arrival (usually at a queue) |
| Trace/Deque | a packet departure (usually at a queue) |
| Trace/Drop | packet drop (packet delivered to drop-target) |
| Trace/Recv | packet receive event at the destination node of a link |
| SnoopQueue/In | on input, collect a time/size sample (pass packet on) |
| SnoopQueue/Out | on output, collect a time/size sample (pass packet on) |
| SnoopQueue/Drop | on drop, collect a time/size sample (pass packet on) |
| SnoopQueue/EDrop | on an "early" drop, collect a time/size sample (pass packet on) |
Objects of the following types are added in the simulation and a referenced by the objects listed above. They are used to aggregate statistics collected by the SnoopQueue objects:
| QueueMonitor | receive and aggregate collected samples from snoopers |
| QueueMonitor/ED | queue-monitor capable of distinguishing between ``early'' and standard packet drops |
| QueueMonitor/ED/Flowmon | per-flow statistics monitor (manager) |
| QueueMonitor/ED/Flow | per-flow statistics container |
| QueueMonitor/Compat | a replacement for a standard QueueMonitor when ns v1 compatibility is in use |