10#include "ns3/assert.h"
12#include "ns3/simulator.h"
32 .AddAttribute(
"Lifetime",
33 "The lifetime of the routing entry",
60 const uint16_t seqnum)
76 i->second.retransmitter = retransmitter;
77 i->second.interface = interface;
78 i->second.cost = cost;
static Mac48Address GetBroadcast()
A base class which provides memory management and object aggregation.
static Time Now()
Return the current simulation virtual time.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
LookupResult Lookup(Mac48Address destination)
Lookup path to destination.
void DoDispose() override
Destructor implementation.
static const uint32_t INTERFACE_ANY
Means all interfaces.
void AddPath(const Mac48Address destination, const Mac48Address retransmitter, const uint32_t interface, const uint8_t cost, const uint16_t seqnum)
Add path.
static TypeId GetTypeId()
Get the type ID.
std::map< Mac48Address, Route > m_routes
List of routes.
Time m_lifetime
Lifetime parameter.
static const uint32_t MAX_COST
Maximum (the best?) path cost.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Route lookup result, return type of LookupXXX methods.
uint32_t ifIndex
IF index.
uint16_t seqnum
sequence number
bool operator==(const LookupResult &o) const
Compare route lookup results, used by tests.
Mac48Address retransmitter
retransmitter
uint32_t seqnum
sequence number
Time whenExpire
expire when?
Mac48Address retransmitter
retransmitter
uint32_t interface
interface