--- a/src/dsr/model/dsr-passive-buff.h Fri Dec 13 11:21:57 2013 +0100
+++ b/src/dsr/model/dsr-passive-buff.h Fri Dec 13 10:28:25 2013 -0500
@@ -45,7 +45,19 @@
class PassiveBuffEntry
{
public:
- // / c-tor
+ /**
+ * Construct a PassiveBuffEntry with the given parameters
+ *
+ * \param pa packet
+ * \param d IPv4 address of the destination
+ * \param s IPv4 address of the source
+ * \param n IPv4 address of the next hop node
+ * \param i ID
+ * \param f fragment offset
+ * \param seg number of segments left
+ * \param exp expiration time
+ * \param p protocol number
+ */
PassiveBuffEntry (Ptr<const Packet> pa = 0, Ipv4Address d = Ipv4Address (), Ipv4Address s = Ipv4Address (),
Ipv4Address n = Ipv4Address (), uint16_t i = 0, uint16_t f = 0, uint8_t seg = 0, Time exp = Simulator::Now (),
uint8_t p = 0)
@@ -68,7 +80,7 @@
{
return ((m_packet == o.m_packet) && (m_source == o.m_source) && (m_nextHop == o.m_nextHop) && (m_dst == o.m_dst) && (m_expire == o.m_expire));
}
- // /\name Fields
+ ///\name Fields
// \{
Ptr<const Packet> GetPacket () const
{
@@ -144,21 +156,21 @@
}
// \}
private:
- // / Data packet
+ /// Data packet
Ptr<const Packet> m_packet;
- // / Destination address
+ /// Destination address
Ipv4Address m_dst;
- // / Source address
+ /// Source address
Ipv4Address m_source;
- // / Nexthop address
+ /// Nexthop address
Ipv4Address m_nextHop;
- // /
+ ///
uint16_t m_identification;
uint16_t m_fragmentOffset;
uint8_t m_segsLeft;
- // / Expire time for queue entry
+ /// Expire time for queue entry
Time m_expire;
- // / The protocol number
+ /// The protocol number
uint8_t m_protocol;
};
@@ -170,31 +182,23 @@
class PassiveBuffer : public Object
{
public:
- // / c-tor
- /**
- * \brief Get the type identificator.
- * \return type identificator
- */
+
static TypeId GetTypeId ();
- /**
- * \brief Constructor.
- */
+
PassiveBuffer ();
- /**
- * \brief Destructor.
- */
virtual ~PassiveBuffer ();
- // / Push entry in queue, if there is no entry with the same packet and destination address in queue.
+
+ /// Push entry in queue, if there is no entry with the same packet and destination address in queue.
bool Enqueue (PassiveBuffEntry & entry);
- // / Return first found (the earliest) entry for given destination
+ /// Return first found (the earliest) entry for given destination
bool Dequeue (Ipv4Address dst, PassiveBuffEntry & entry);
- // / Finds whether a packet with destination dst exists in the queue
+ /// Finds whether a packet with destination dst exists in the queue
bool Find (Ipv4Address dst);
- // / Check if all the entries in passive buffer entry is all equal or not
+ /// Check if all the entries in passive buffer entry is all equal or not
bool AllEqual (PassiveBuffEntry & entry);
- // / Number of entries
+ /// Number of entries
uint32_t GetSize ();
- // /\name Fields
+ ///\name Fields
// \{
uint32_t GetMaxQueueLen () const
{
@@ -215,19 +219,19 @@
// \}
private:
- // / The send buffer to cache unsent packet
+ /// The send buffer to cache unsent packet
std::vector<PassiveBuffEntry> m_passiveBuffer;
- // / Remove all expired entries
+ /// Remove all expired entries
void Purge ();
- // / Notify that packet is dropped from queue by timeout
+ /// Notify that packet is dropped from queue by timeout
void Drop (PassiveBuffEntry en, std::string reason);
- // / Notify that packet is dropped from queue by timeout
+ /// Notify that packet is dropped from queue by timeout
void DropLink (PassiveBuffEntry en, std::string reason);
- // / The maximum number of packets that we allow a routing protocol to buffer.
+ /// The maximum number of packets that we allow a routing protocol to buffer.
uint32_t m_maxLen;
- // / The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
+ /// The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
Time m_passiveBufferTimeout;
- // / Check if the send buffer entry is the same or not
+ /// Check if the send buffer entry is the same or not
static bool LinkEqual (PassiveBuffEntry en, const std::vector<Ipv4Address> link)
{
return ((en.GetSource () == link[0]) && (en.GetNextHop () == link[1]));