The C++ Agent../ns-2/agent.h includes enough internal state to assign various fields to a simulated packet before it is sent. This state includes the following:
addr
_ |
node address of myself (source address in packets) |
dst
_ |
where I am sending packets to |
size
_ |
packet size in bytes (placed into the common packet header) |
type
_ |
type of packet (in the common header, see packet.h) |
fid
_ |
the IP flow identifier (formerly class in ns-1) |
prio
_ |
the IP priority field |
flags
_ |
packet flags (similar to ns-1) |
defttl
_ |
default IP ttl value |
These variables may be modified by any class derived from Agent, although not all of them may be needed by any particular agent.