File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 16
16
17
17
#include " inet/routing/dsdv/Dsdv.h"
18
18
19
+ #include < sstream>
20
+
19
21
#include " inet/common/IProtocolRegistrationListener.h"
20
22
#include " inet/common/ModuleAccess.h"
21
23
#include " inet/common/ProtocolTag_m.h"
@@ -360,5 +362,12 @@ void Dsdv::purge()
360
362
}
361
363
}
362
364
365
+ std::string DsdvIpv4Route::str () const
366
+ {
367
+ std::ostringstream out;
368
+ out << Ipv4Route::str () << " seqNo:" << getSequencenumber () << " expiryTime:" << getExpiryTime ();
369
+ return out.str ();
370
+ }
371
+
363
372
} // namespace inet
364
373
Original file line number Diff line number Diff line change 20
20
#include < stdio.h>
21
21
#include < string.h>
22
22
23
- #include < sstream>
24
23
#include < list>
25
24
#include < map>
26
25
#include < vector>
@@ -99,17 +98,7 @@ class INET_API DsdvIpv4Route : public Ipv4Route
99
98
simtime_t expiryTime; // time the routing entry is valid until
100
99
101
100
public:
102
- std::string str () const override
103
- {
104
- std::stringstream out;
105
-
106
- out << Ipv4Route::str () << " " ;
107
- out << " seqNo:" << getSequencenumber () << " " ;
108
- out << " expiryTime:" << getExpiryTime ();
109
-
110
- return out.str ();
111
- }
112
-
101
+ virtual std::string str () const override ;
113
102
bool isExpired () const { return expiryTime != 0 && expiryTime <= simTime (); }
114
103
115
104
simtime_t getExpiryTime () const { return expiryTime; }
You can’t perform that action at this time.
0 commit comments