NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
fib-entry.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_TABLE_FIB_ENTRY_HPP
27
#define NFD_DAEMON_TABLE_FIB_ENTRY_HPP
28
29
#include "
fib-nexthop.hpp
"
30
31
namespace
nfd
{
32
33
class
NameTree
;
34
namespace
name_tree {
35
class
Entry
;
36
}
37
38
namespace
fib {
39
48
typedef
std::vector<fib::NextHop>
NextHopList
;
49
53
class
Entry
: noncopyable
54
{
55
public
:
56
explicit
57
Entry
(
const
Name
& prefix);
58
59
const
Name
&
60
getPrefix()
const
;
61
62
const
NextHopList&
63
getNextHops()
const
;
64
67
bool
68
hasNextHops()
const
;
69
74
bool
75
hasNextHop(shared_ptr<Face>
face
)
const
;
76
82
void
83
addNextHop(shared_ptr<Face> face, uint64_t cost);
84
91
void
92
removeNextHop(shared_ptr<Face> face);
93
94
private
:
97
NextHopList::iterator
98
findNextHop(Face& face);
99
101
void
102
sortNextHops();
103
104
private
:
105
Name
m_prefix;
106
NextHopList m_nextHops;
107
108
shared_ptr<name_tree::Entry> m_nameTreeEntry;
109
friend
class
nfd::NameTree
;
110
friend
class
nfd::name_tree::Entry
;
111
};
112
113
114
inline
const
Name
&
115
Entry::getPrefix
()
const
116
{
117
return
m_prefix;
118
}
119
120
inline
const
NextHopList&
121
Entry::getNextHops()
const
122
{
123
return
m_nextHops;
124
}
125
126
inline
bool
127
Entry::hasNextHops()
const
128
{
129
return
!m_nextHops.
empty
();
130
}
131
132
}
// namespace fib
133
}
// namespace nfd
134
135
#endif // NFD_DAEMON_TABLE_FIB_ENTRY_HPP
nfd::fib::Entry
represents a FIB entry
Definition:
fib-entry.hpp:53
fib-nexthop.hpp
nfd::name_tree::Entry::getPrefix
const Name & getPrefix() const
Definition:
name-tree-entry.hpp:149
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::NameTree
Class Name Tree.
Definition:
name-tree.hpp:79
nfd::fib::NextHopList
std::vector< fib::NextHop > NextHopList
Definition:
fib-entry.hpp:48
face
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
nfd::NameTree
NameTree
Definition:
name-tree.cpp:36
ndn::Name::empty
bool empty() const
Check if name is emtpy.
Definition:
name.hpp:398
nfd::name_tree::Entry
Name Tree Entry Class.
Definition:
name-tree-entry.hpp:65
ndnSIM
NFD
daemon
table
fib-entry.hpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12