NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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 "
core/scheduler.hpp
"
30
#include <ndn-cxx/encoding/nfd-constants.hpp>
31
#include <ndn-cxx/mgmt/nfd/route-flags-traits.hpp>
32
#include <type_traits>
33
34
namespace
nfd
{
35
namespace
rib {
36
39
class
Route
:
public
ndn::nfd::RouteFlagsTraits
<Route>
40
{
41
public
:
42
Route
();
43
44
void
45
setExpirationEvent
(
const
scheduler::EventId
eid)
46
{
47
m_expirationEvent = eid;
48
}
49
50
const
scheduler::EventId
&
51
getExpirationEvent
()
const
52
{
53
return
m_expirationEvent;
54
}
55
56
std::underlying_type<ndn::nfd::RouteFlags>::type
57
getFlags
()
const
58
{
59
return
flags
;
60
}
61
62
public
:
63
uint64_t
faceId
;
64
ndn::nfd::RouteOrigin
origin
;
65
uint64_t
cost
;
66
std::underlying_type<ndn::nfd::RouteFlags>::type
flags
;
67
ndn::optional<time::steady_clock::TimePoint>
expires
;
68
69
private
:
70
scheduler::EventId
m_expirationEvent;
71
};
72
73
bool
74
operator==
(
const
Route
& lhs,
const
Route
& rhs);
75
76
inline
bool
77
operator!=
(
const
Route
& lhs,
const
Route
& rhs)
78
{
79
return
!(lhs == rhs);
80
}
81
82
inline
bool
83
compareFaceIdAndOrigin
(
const
Route
& lhs,
const
Route
& rhs)
84
{
85
return
(lhs.
faceId
== rhs.
faceId
&& lhs.
origin
== rhs.
origin
);
86
}
87
88
inline
bool
89
compareFaceId
(
const
Route
& route,
const
uint64_t
faceId
)
90
{
91
return
(route.
faceId
== faceId);
92
}
93
94
std::ostream&
95
operator<<
(std::ostream& os,
const
Route
& route);
96
97
}
// namespace rib
98
}
// namespace nfd
99
100
#endif // NFD_RIB_ROUTE_HPP
nfd::rib::Route::setExpirationEvent
void setExpirationEvent(const scheduler::EventId eid)
Definition:
route.hpp:45
nfd::rib::operator==
bool operator==(const Route &lhs, const Route &rhs)
Definition:
route.cpp:41
ndn::nfd::RouteFlagsTraits
defines getters for each route inheritance flag
Definition:
route-flags-traits.hpp:38
nfd::rib::operator<<
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
Definition:
fib-update.hpp:74
nfd::rib::Route::Route
Route()
Definition:
route.cpp:32
nfd::rib::Route::flags
std::underlying_type< ndn::nfd::RouteFlags >::type flags
Definition:
route.hpp:66
nfd::rib::Route::getFlags
std::underlying_type< ndn::nfd::RouteFlags >::type getFlags() const
Definition:
route.hpp:57
ndn::optional< time::steady_clock::TimePoint >
nfd::rib::Route::cost
uint64_t cost
Definition:
route.hpp:65
nfd::rib::Route::faceId
uint64_t faceId
Definition:
route.hpp:63
nfd::rib::compareFaceIdAndOrigin
bool compareFaceIdAndOrigin(const Route &lhs, const Route &rhs)
Definition:
route.hpp:83
nfd::rib::operator!=
bool operator!=(const Route &lhs, const Route &rhs)
Definition:
route.hpp:77
nfd::rib::Route::expires
ndn::optional< time::steady_clock::TimePoint > expires
Definition:
route.hpp:67
ndn::util::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:48
nfd::rib::Route::origin
ndn::nfd::RouteOrigin origin
Definition:
route.hpp:64
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::rib::Route
represents a route for a name prefix
Definition:
route.hpp:39
scheduler.hpp
nfd::rib::compareFaceId
bool compareFaceId(const Route &route, const uint64_t faceId)
Definition:
route.hpp:89
ndn::nfd::RouteOrigin
RouteOrigin
Definition:
nfd-constants.hpp:89
nfd::rib::Route::getExpirationEvent
const scheduler::EventId & getExpirationEvent() const
Definition:
route.hpp:51
ndnSIM
NFD
rib
route.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11