Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DSDV] Print IPv4 routing table including specific DSDV info #1006

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/inet/routing/dsdv/Dsdv.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>

#include <sstream>
#include <list>
#include <map>
#include <vector>
Expand Down Expand Up @@ -98,6 +99,17 @@ class INET_API DsdvIpv4Route : public Ipv4Route
simtime_t expiryTime; // time the routing entry is valid until

public:
std::string str() const override
{
std::stringstream out;

out << Ipv4Route::str() << " ";
out << "seqNo:" << getSequencenumber() << " ";
out << "expiryTime:" << getExpiryTime();

return out.str();
}

bool isExpired() const { return expiryTime != 0 && expiryTime <= simTime(); }

simtime_t getExpiryTime() const { return expiryTime; }
Expand Down