NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
route.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_RIB_ROUTE_HPP
27
#define NFD_RIB_ROUTE_HPP
28
29
#include "common.hpp"
30
#include "
core/scheduler.hpp
"
31
32
namespace
nfd
{
33
namespace
rib {
34
37
class
Route
38
{
39
public
:
40
Route
()
41
:
faceId
(0)
42
,
origin
(0)
43
,
flags
(0)
44
,
cost
(0)
45
,
expires
(
time
::steady_clock::TimePoint::min())
46
, m_expirationEvent()
47
{
48
}
49
50
bool
51
operator==
(
const
Route
& other)
const
;
52
53
public
:
54
void
55
setExpirationEvent
(
const
scheduler::EventId
eid)
56
{
57
m_expirationEvent = eid;
58
}
59
60
const
scheduler::EventId
&
61
getExpirationEvent
()
const
62
{
63
return
m_expirationEvent;
64
}
65
66
bool
67
isChildInherit
()
const
68
{
69
return
flags
&
ndn::nfd::ROUTE_FLAG_CHILD_INHERIT
;
70
}
71
72
bool
73
isCapture
()
const
74
{
75
return
flags
&
ndn::nfd::ROUTE_FLAG_CAPTURE
;
76
}
77
78
public
:
79
uint64_t
faceId
;
80
uint64_t
origin
;
81
uint64_t
flags
;
82
uint64_t
cost
;
83
time::steady_clock::TimePoint
expires
;
84
85
private
:
86
scheduler::EventId
m_expirationEvent;
87
};
88
89
inline
bool
90
compareFaceIdAndOrigin
(
const
Route
& lhs,
const
Route
& rhs)
91
{
92
return
(lhs.
faceId
== rhs.
faceId
&& lhs.
origin
== rhs.
origin
);
93
}
94
95
inline
bool
96
compareFaceId
(
const
Route
& route,
const
uint64_t
faceId
)
97
{
98
return
(route.
faceId
== faceId);
99
}
100
101
std::ostream&
102
operator<<
(std::ostream& os,
const
Route
& route);
103
104
}
// namespace rib
105
}
// namespace nfd
106
107
#endif // NFD_RIB_ROUTE_HPP
ndn::time::steady_clock::TimePoint
time_point TimePoint
Definition:
time.hpp:108
nfd::rib::Route::setExpirationEvent
void setExpirationEvent(const scheduler::EventId eid)
Definition:
route.hpp:55
nfd::rib::Route::expires
time::steady_clock::TimePoint expires
Definition:
route.hpp:83
nfd::rib::operator<<
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
Definition:
fib-update.hpp:74
nfd::rib::Route::Route
Route()
Definition:
route.hpp:40
nfd::rib::Route::cost
uint64_t cost
Definition:
route.hpp:82
nfd::rib::Route::faceId
uint64_t faceId
Definition:
route.hpp:79
nfd::rib::compareFaceIdAndOrigin
bool compareFaceIdAndOrigin(const Route &lhs, const Route &rhs)
Definition:
route.hpp:90
nfd::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
ndn::time
Definition:
time-custom-clock.hpp:28
nfd::rib::Route::operator==
bool operator==(const Route &other) const
Definition:
route.cpp:32
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
ndn::nfd::ROUTE_FLAG_CAPTURE
Definition:
nfd-constants.hpp:92
nfd::rib::Route::origin
uint64_t origin
Definition:
route.hpp:80
nfd::rib::Route
represents a route for a name prefix
Definition:
route.hpp:37
scheduler.hpp
nfd::rib::Route::isChildInherit
bool isChildInherit() const
Definition:
route.hpp:67
nfd::rib::Route::flags
uint64_t flags
Definition:
route.hpp:81
nfd::rib::compareFaceId
bool compareFaceId(const Route &route, const uint64_t faceId)
Definition:
route.hpp:96
nfd::rib::Route::isCapture
bool isCapture() const
Definition:
route.hpp:73
nfd::rib::Route::getExpirationEvent
const scheduler::EventId & getExpirationEvent() const
Definition:
route.hpp:61
ndn::nfd::ROUTE_FLAG_CHILD_INHERIT
Definition:
nfd-constants.hpp:91
ndnSIM
NFD
rib
route.hpp
Generated on Tue Feb 23 2016 22:18:45 for ndnSIM by
1.8.11