--- a/src/routing/aodv/aodv-routing-protocol.cc Fri Dec 10 15:22:36 2010 +0100
+++ b/src/routing/aodv/aodv-routing-protocol.cc Tue Dec 14 21:41:21 2010 -0800
@@ -194,11 +194,13 @@
MakeTimeChecker ())
.AddAttribute ("MaxQueueLen", "Maximum number of packets that we allow a routing protocol to buffer.",
UintegerValue (64),
- MakeUintegerAccessor (&RoutingProtocol::MaxQueueLen),
+ MakeUintegerAccessor (&RoutingProtocol::SetMaxQueueLen,
+ &RoutingProtocol::GetMaxQueueLen),
MakeUintegerChecker<uint32_t> ())
.AddAttribute ("MaxQueueTime", "Maximum time packets can be queued (in seconds)",
TimeValue (Seconds (30)),
- MakeTimeAccessor (&RoutingProtocol::MaxQueueTime),
+ MakeTimeAccessor (&RoutingProtocol::SetMaxQueueTime,
+ &RoutingProtocol::GetMaxQueueTime),
MakeTimeChecker ())
.AddAttribute ("AllowedHelloLoss", "Number of hello messages which may be loss for valid link.",
UintegerValue (2),
@@ -228,6 +230,19 @@
return tid;
}
+void
+RoutingProtocol::SetMaxQueueLen (uint32_t len)
+{
+ MaxQueueLen = len;
+ m_queue.SetMaxQueueLen (len);
+}
+void
+RoutingProtocol::SetMaxQueueTime (Time t)
+{
+ MaxQueueTime = t;
+ m_queue.SetQueueTimeout (t);
+}
+
RoutingProtocol::~RoutingProtocol ()
{
}
--- a/src/routing/aodv/aodv-routing-protocol.h Fri Dec 10 15:22:36 2010 +0100
+++ b/src/routing/aodv/aodv-routing-protocol.h Tue Dec 14 21:41:21 2010 -0800
@@ -74,6 +74,10 @@
///\name Handle protocol parameters
//\{
+ Time GetMaxQueueTime () const { return MaxQueueTime; }
+ void SetMaxQueueTime (Time t);
+ uint32_t GetMaxQueueLen () const { return MaxQueueLen; }
+ void SetMaxQueueLen (uint32_t len);
bool GetDesinationOnlyFlag () const { return DestinationOnly; }
void SetDesinationOnlyFlag (bool f) { DestinationOnly = f; }
bool GetGratuitousReplyFlag () const { return GratuitousReply; }