NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
pit-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_PIT_ENTRY_HPP
27
#define NFD_DAEMON_TABLE_PIT_ENTRY_HPP
28
29
#include "
pit-in-record.hpp
"
30
#include "
pit-out-record.hpp
"
31
#include "
core/scheduler.hpp
"
32
33
namespace
nfd
{
34
35
class
NameTree
;
36
37
namespace
name_tree {
38
class
Entry;
39
}
// namespace name_tree
40
41
class
Pit;
42
43
namespace
pit {
44
47
typedef
std::list< InRecord>
InRecordCollection
;
48
51
typedef
std::list<OutRecord>
OutRecordCollection
;
52
55
enum
DuplicateNonceWhere
{
56
DUPLICATE_NONCE_NONE
= 0,
58
DUPLICATE_NONCE_IN_SAME
= (1 << 0),
60
DUPLICATE_NONCE_IN_OTHER
= (1 << 1),
62
DUPLICATE_NONCE_OUT_SAME
= (1 << 2),
64
DUPLICATE_NONCE_OUT_OTHER
= (1 << 3)
65
};
66
69
class
Entry
:
public
StrategyInfoHost
, noncopyable
70
{
71
public
:
72
explicit
73
Entry
(
const
Interest
& interest);
74
75
const
Interest
&
76
getInterest()
const
;
77
80
const
Name
&
81
getName()
const
;
82
89
bool
90
canForwardTo(
const
Face&
face
)
const
;
91
101
bool
102
violatesScope(
const
Face& face)
const
;
103
107
int
108
findNonce(uint32_t nonce,
const
Face& face)
const
;
109
110
public
:
// InRecord
111
const
InRecordCollection&
112
getInRecords()
const
;
113
119
bool
120
hasLocalInRecord()
const
;
121
128
InRecordCollection::iterator
129
insertOrUpdateInRecord(shared_ptr<Face> face,
const
Interest
& interest);
130
134
InRecordCollection::const_iterator
135
getInRecord(
const
Face& face)
const
;
136
138
void
139
deleteInRecord(
const
Face& face);
140
142
void
143
deleteInRecords();
144
145
public
:
// OutRecord
146
const
OutRecordCollection&
147
getOutRecords()
const
;
148
154
OutRecordCollection::iterator
155
insertOrUpdateOutRecord(shared_ptr<Face> face,
const
Interest
& interest);
156
160
OutRecordCollection::iterator
161
getOutRecord(
const
Face& face);
162
164
void
165
deleteOutRecord(
const
Face& face);
166
169
bool
170
hasUnexpiredOutRecords()
const
;
171
172
public
:
173
scheduler::EventId
m_unsatisfyTimer
;
174
scheduler::EventId
m_stragglerTimer
;
175
176
private
:
177
shared_ptr<const Interest> m_interest;
178
InRecordCollection m_inRecords;
179
OutRecordCollection m_outRecords;
180
181
static
const
Name
LOCALHOST_NAME;
182
static
const
Name
LOCALHOP_NAME;
183
184
shared_ptr<name_tree::Entry> m_nameTreeEntry;
185
186
friend
class
nfd::NameTree
;
187
friend
class
nfd::name_tree::Entry
;
188
friend
class
nfd::Pit
;
189
};
190
191
inline
const
Interest
&
192
Entry::getInterest()
const
193
{
194
return
*m_interest;
195
}
196
197
inline
const
InRecordCollection&
198
Entry::getInRecords()
const
199
{
200
return
m_inRecords;
201
}
202
203
inline
const
OutRecordCollection&
204
Entry::getOutRecords()
const
205
{
206
return
m_outRecords;
207
}
208
209
}
// namespace pit
210
}
// namespace nfd
211
212
#endif // NFD_DAEMON_TABLE_PIT_ENTRY_HPP
nfd::pit::InRecordCollection
std::list< InRecord > InRecordCollection
represents an unordered collection of InRecords
Definition:
pit-entry.hpp:47
nfd::pit::DUPLICATE_NONCE_IN_OTHER
in-record of other face
Definition:
pit-entry.hpp:60
nfd::pit::Entry::m_stragglerTimer
scheduler::EventId m_stragglerTimer
Definition:
pit-entry.hpp:174
nfd::StrategyInfoHost
base class for an entity onto which StrategyInfo objects may be placed
Definition:
strategy-info-host.hpp:35
pit-in-record.hpp
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:45
nfd::Pit
represents the Interest Table
Definition:
pit.hpp:48
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
ndn::util::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::pit::Entry
represents a PIT entry
Definition:
pit-entry.hpp:69
nfd::NameTree
Class Name Tree.
Definition:
name-tree.hpp:79
nfd::pit::DUPLICATE_NONCE_OUT_SAME
out-record of same face
Definition:
pit-entry.hpp:62
face
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
scheduler.hpp
nfd::pit::OutRecordCollection
std::list< OutRecord > OutRecordCollection
represents an unordered collection of OutRecords
Definition:
pit-entry.hpp:51
nfd::pit::DUPLICATE_NONCE_IN_SAME
in-record of same face
Definition:
pit-entry.hpp:58
nfd::NameTree
NameTree
Definition:
name-tree.cpp:36
nfd::pit::DUPLICATE_NONCE_OUT_OTHER
out-record of other face
Definition:
pit-entry.hpp:64
nfd::pit::DUPLICATE_NONCE_NONE
Definition:
pit-entry.hpp:56
pit-out-record.hpp
nfd::pit::DuplicateNonceWhere
DuplicateNonceWhere
indicates where duplicate Nonces are found
Definition:
pit-entry.hpp:55
nfd::pit::Entry::m_unsatisfyTimer
scheduler::EventId m_unsatisfyTimer
Definition:
pit-entry.hpp:173
nfd::name_tree::Entry
Name Tree Entry Class.
Definition:
name-tree-entry.hpp:65
ndnSIM
NFD
daemon
table
pit-entry.hpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12