13.2 Packet Classes

There are four C++ classes relevant to the handling of packets and packet headers in general: Packet, p_info PacketHeader, and PacketHeaderManager. The Packet../ns-2/packet.h defines the type for all packets in the simulation; it is a subclass of Event so that packets may be scheduled (e.g. for later arrival at some queue). The packet_info../ns-2/packet.h holds all text representations for packet names. The PacketHeader../ns-2/packet.h provides a base class for any packet header configured into the simulation. It essentially provides enough internal state to locate any particular packet header in the collection of packet headers present in any given packet. The PacketHeaderManager../ns-2/packet.h defines a class used to collect and manage currently-configured headers. It is invoked by a method available to OTcl at simulation configuration time to enable some subset of the compiled-in packet headers.



Subsections

Tom Henderson 2014-12-17