print header + cosmetics
This commit is contained in:
@@ -255,7 +255,7 @@ RrepHeader::Print (std::ostream &os) const
|
||||
if(prefixSize != 0)
|
||||
os << "prefix size " << prefixSize << "\n";
|
||||
else os << "\n";
|
||||
os << "source ipv4 " << rp_src
|
||||
os << "source ipv4 " << rp_src << "\n"
|
||||
<< "life time " << rp_lifetime << "\n"
|
||||
<< "acknowledgment required flag " << (*this).GetAckRequired() << "\n";
|
||||
}
|
||||
@@ -404,10 +404,9 @@ RrepAckHeader::Deserialize (Buffer::Iterator start)
|
||||
void
|
||||
RrepAckHeader::Print (std::ostream &os) const
|
||||
{
|
||||
// TODO
|
||||
os << "RREP-ACK\n";
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
RrepAckHeader::operator==(RrepAckHeader const & o) const
|
||||
{
|
||||
@@ -509,7 +508,13 @@ RerrHeader::Deserialize (Buffer::Iterator start)
|
||||
void
|
||||
RerrHeader::Print (std::ostream &os) const
|
||||
{
|
||||
// TODO
|
||||
os << "REER\n"
|
||||
<< "Unreachable destination (ipv4 address, seq. number):\n";
|
||||
std::map<Ipv4Address, uint32_t>::const_iterator j;
|
||||
for(j = unreachable_dst.begin(); j != unreachable_dst.end(); ++j)
|
||||
{
|
||||
os << (*j).first << ", " << (*j).second << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -185,13 +185,13 @@ public:
|
||||
bool operator==(RrepHeader const & o) const;
|
||||
private:
|
||||
static MessageType type() { return AODVTYPE_RREP; }
|
||||
uint8_t rp_flags; ///< A - acknowledgment required flag
|
||||
uint8_t prefixSize; ///< Prefix Size
|
||||
uint8_t rp_hop_count; ///< Hop Count
|
||||
Ipv4Address rp_dst; ///< Destination IP Address
|
||||
uint32_t rp_dst_seqno; ///< Destination Sequence Number
|
||||
Ipv4Address rp_src; ///< Source IP Address
|
||||
uint32_t rp_lifetime; ///< Lifetime
|
||||
uint8_t rp_flags; ///< A - acknowledgment required flag
|
||||
uint8_t prefixSize; ///< Prefix Size
|
||||
uint8_t rp_hop_count; ///< Hop Count
|
||||
Ipv4Address rp_dst; ///< Destination IP Address
|
||||
uint32_t rp_dst_seqno; ///< Destination Sequence Number
|
||||
Ipv4Address rp_src; ///< Source IP Address
|
||||
uint32_t rp_lifetime; ///< Lifetime
|
||||
};
|
||||
|
||||
std::ostream & operator<<(std::ostream & os, RrepHeader const &);
|
||||
@@ -271,9 +271,9 @@ public:
|
||||
bool operator==(RerrHeader const & o) const;
|
||||
private:
|
||||
static MessageType type() { return AODVTYPE_RERR; }
|
||||
uint8_t er_flag; ///< No delete flag
|
||||
uint8_t reserved; ///< Not used
|
||||
uint8_t destCount; ///< DestCount
|
||||
uint8_t er_flag; ///< No delete flag
|
||||
uint8_t reserved; ///< Not used
|
||||
uint8_t destCount; ///< DestCount
|
||||
/// List of Unreachable destination IP addresses and sequence numbers
|
||||
std::map<Ipv4Address, uint32_t> unreachable_dst;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user