NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
k
l
n
o
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
f
i
k
l
n
p
q
r
s
t
u
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Enumerations
+
Enumerator
a
c
d
e
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
f
g
i
k
l
m
n
p
r
s
t
Typedefs
+
Macros
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
route.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2014-2018, Regents of the University of California,
4
* Arizona Board of Regents,
5
* Colorado State University,
6
* University Pierre & Marie Curie, Sorbonne University,
7
* Washington University in St. Louis,
8
* Beijing Institute of Technology,
9
* The University of Memphis.
10
*
11
* This file is part of NFD (Named Data Networking Forwarding Daemon).
12
* See AUTHORS.md for complete list of NFD authors and contributors.
13
*
14
* NFD is free software: you can redistribute it and/or modify it under the terms
15
* of the GNU General Public License as published by the Free Software Foundation,
16
* either version 3 of the License, or (at your option) any later version.
17
*
18
* NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
19
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20
* PURPOSE. See the GNU General Public License for more details.
21
*
22
* You should have received a copy of the GNU General Public License along with
23
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
24
*/
25
26
#ifndef NFD_RIB_ROUTE_HPP
27
#define NFD_RIB_ROUTE_HPP
28
29
#include "
core/scheduler.hpp
"
30
31
#include <ndn-cxx/encoding/nfd-constants.hpp>
32
#include <ndn-cxx/mgmt/nfd/route-flags-traits.hpp>
33
34
#include <type_traits>
35
36
namespace
nfd
{
37
namespace
rib {
38
41
class
Route
:
public
ndn::nfd::RouteFlagsTraits
<Route>
42
{
43
public
:
44
Route
();
45
46
void
47
setExpirationEvent
(
const
scheduler::EventId
eid)
48
{
49
m_expirationEvent = eid;
50
}
51
52
const
scheduler::EventId
&
53
getExpirationEvent
()
const
54
{
55
return
m_expirationEvent;
56
}
57
58
std::underlying_type<ndn::nfd::RouteFlags>::type
59
getFlags
()
const
60
{
61
return
flags
;
62
}
63
64
public
:
65
uint64_t
faceId
;
66
ndn::nfd::RouteOrigin
origin
;
67
uint64_t
cost
;
68
std::underlying_type<ndn::nfd::RouteFlags>::type
flags
;
69
optional<time::steady_clock::TimePoint>
expires
;
70
71
private
:
72
scheduler::EventId
m_expirationEvent;
73
};
74
75
bool
76
operator==
(
const
Route
& lhs,
const
Route
& rhs);
77
78
inline
bool
79
operator!=
(
const
Route
& lhs,
const
Route
& rhs)
80
{
81
return
!(lhs == rhs);
82
}
83
84
inline
bool
85
compareFaceIdAndOrigin
(
const
Route
& lhs,
const
Route
& rhs)
86
{
87
return
(lhs.
faceId
== rhs.
faceId
&& lhs.
origin
== rhs.
origin
);
88
}
89
90
inline
bool
91
compareFaceId
(
const
Route
& route,
const
uint64_t faceId)
92
{
93
return
(route.
faceId
== faceId);
94
}
95
96
std::ostream&
97
operator<<
(std::ostream& os,
const
Route
& route);
98
99
}
// namespace rib
100
}
// namespace nfd
101
102
#endif // NFD_RIB_ROUTE_HPP
nfd::scheduler::EventId
Opaque handle for a scheduled event.
nfd::rib::Route::getExpirationEvent
const scheduler::EventId & getExpirationEvent() const
Definition:
route.hpp:53
nfd::rib::Route::setExpirationEvent
void setExpirationEvent(const scheduler::EventId eid)
Definition:
route.hpp:47
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::Route::getFlags
std::underlying_type< ndn::nfd::RouteFlags >::type getFlags() const
Definition:
route.hpp:59
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:68
ndn::optional
Definition:
backports-optional.hpp:93
nfd::rib::Route::cost
uint64_t cost
Definition:
route.hpp:67
nfd::rib::Route::faceId
uint64_t faceId
Definition:
route.hpp:65
nfd::rib::compareFaceIdAndOrigin
bool compareFaceIdAndOrigin(const Route &lhs, const Route &rhs)
Definition:
route.hpp:85
nfd::rib::Route::expires
optional< time::steady_clock::TimePoint > expires
Definition:
route.hpp:69
nfd::rib::operator!=
bool operator!=(const Route &lhs, const Route &rhs)
Definition:
route.hpp:79
nfd::rib::Route::origin
ndn::nfd::RouteOrigin origin
Definition:
route.hpp:66
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:41
scheduler.hpp
nfd::rib::compareFaceId
bool compareFaceId(const Route &route, const uint64_t faceId)
Definition:
route.hpp:91
ndn::nfd::RouteOrigin
RouteOrigin
Definition:
nfd-constants.hpp:99
ndn::tlv::nfd::Route
Definition:
tlv-nfd.hpp:100
ndnSIM
NFD
rib
route.hpp
Generated on Tue Aug 7 2018 16:19:18 for ndnSIM by
1.8.14