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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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::getNextHops
const NextHopList & getNextHops() const
Definition:
fib-entry.hpp:121
nfd::fib::Entry::addNextHop
void addNextHop(shared_ptr< Face > face, uint64_t cost)
adds a NextHop record
Definition:
fib-entry.cpp:52
nfd::fib::Entry::removeNextHop
void removeNextHop(shared_ptr< Face > face)
removes a NextHop record
Definition:
fib-entry.cpp:68
nfd::fib::Entry
represents a FIB entry
Definition:
fib-entry.hpp:53
nfd::fib::Entry::getPrefix
const Name & getPrefix() const
Definition:
fib-entry.hpp:115
nfd::fib::Entry::hasNextHop
bool hasNextHop(shared_ptr< Face > face) const
Definition:
fib-entry.cpp:46
fib-nexthop.hpp
nfd::Face
represents a face
Definition:
face.hpp:59
nfd::fib::Entry::Entry
Entry(const Name &prefix)
Definition:
fib-entry.cpp:31
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
nfd::NameTree
Class Name Tree.
Definition:
name-tree.hpp:79
nfd::fib::NextHopList
std::vector< fib::NextHop > NextHopList
Definition:
fib-entry.hpp:48
nfd::fib::Entry::hasNextHops
bool hasNextHops() const
Definition:
fib-entry.hpp:127
nfd::NameTree
NameTree
Definition:
name-tree.cpp:36
nfd::name_tree::Entry
Name Tree Entry Class.
Definition:
name-tree-entry.hpp:65
ndnSIM
NFD
daemon
table
fib-entry.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7