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
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
}
40
41
namespace
pit {
42
45
typedef
std::list< InRecord>
InRecordCollection
;
46
49
typedef
std::list<OutRecord>
OutRecordCollection
;
50
53
enum
DuplicateNonceWhere
{
54
DUPLICATE_NONCE_NONE
= 0,
56
DUPLICATE_NONCE_IN_SAME
= (1 << 0),
58
DUPLICATE_NONCE_IN_OTHER
= (1 << 1),
60
DUPLICATE_NONCE_OUT_SAME
= (1 << 2),
62
DUPLICATE_NONCE_OUT_OTHER
= (1 << 3)
63
};
64
67
class
Entry
:
public
StrategyInfoHost
, noncopyable
68
{
69
public
:
70
explicit
71
Entry
(
const
Interest
& interest);
72
73
const
Interest
&
74
getInterest()
const
;
75
78
const
Name
&
79
getName()
const
;
80
87
bool
88
canForwardTo(
const
Face
& face)
const
;
89
99
bool
100
violatesScope(
const
Face
& face)
const
;
101
105
int
106
findNonce(uint32_t nonce,
const
Face
& face)
const
;
107
108
public
:
// InRecord
109
const
InRecordCollection&
110
getInRecords()
const
;
111
117
bool
118
hasLocalInRecord()
const
;
119
126
InRecordCollection::iterator
127
insertOrUpdateInRecord(shared_ptr<Face> face,
const
Interest
& interest);
128
132
InRecordCollection::const_iterator
133
getInRecord(
const
Face
& face)
const
;
134
136
void
137
deleteInRecords();
138
139
public
:
// OutRecord
140
const
OutRecordCollection&
141
getOutRecords()
const
;
142
148
OutRecordCollection::iterator
149
insertOrUpdateOutRecord(shared_ptr<Face> face,
const
Interest
& interest);
150
154
OutRecordCollection::const_iterator
155
getOutRecord(
const
Face
& face)
const
;
156
158
void
159
deleteOutRecord(
const
Face
& face);
160
163
bool
164
hasUnexpiredOutRecords()
const
;
165
166
public
:
167
scheduler::EventId
m_unsatisfyTimer
;
168
scheduler::EventId
m_stragglerTimer
;
169
170
private
:
171
shared_ptr<const Interest> m_interest;
172
InRecordCollection m_inRecords;
173
OutRecordCollection m_outRecords;
174
175
static
const
Name
LOCALHOST_NAME;
176
static
const
Name
LOCALHOP_NAME;
177
178
shared_ptr<name_tree::Entry> m_nameTreeEntry;
179
180
friend
class
nfd::NameTree
;
181
friend
class
nfd::name_tree::Entry
;
182
};
183
184
inline
const
Interest
&
185
Entry::getInterest()
const
186
{
187
return
*m_interest;
188
}
189
190
inline
const
InRecordCollection&
191
Entry::getInRecords()
const
192
{
193
return
m_inRecords;
194
}
195
196
inline
const
OutRecordCollection&
197
Entry::getOutRecords()
const
198
{
199
return
m_outRecords;
200
}
201
202
}
// namespace pit
203
}
// namespace nfd
204
205
#endif // NFD_DAEMON_TABLE_PIT_ENTRY_HPP
nfd::pit::InRecordCollection
std::list< InRecord > InRecordCollection
represents an unordered collection of InRecords
Definition:
pit-entry.hpp:45
nfd::pit::DUPLICATE_NONCE_IN_OTHER
in-record of other face
Definition:
pit-entry.hpp:58
nfd::pit::Entry::m_stragglerTimer
scheduler::EventId m_stragglerTimer
Definition:
pit-entry.hpp:168
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::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
nfd::Face
represents a face
Definition:
face.hpp:57
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:38
nfd::pit::Entry
represents a PIT entry
Definition:
pit-entry.hpp:67
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:60
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:49
nfd::pit::DUPLICATE_NONCE_IN_SAME
in-record of same face
Definition:
pit-entry.hpp:56
nfd::NameTree
NameTree
Definition:
name-tree.cpp:36
nfd::pit::DUPLICATE_NONCE_OUT_OTHER
out-record of other face
Definition:
pit-entry.hpp:62
nfd::pit::DUPLICATE_NONCE_NONE
Definition:
pit-entry.hpp:54
pit-out-record.hpp
nfd::pit::DuplicateNonceWhere
DuplicateNonceWhere
indicates where duplicate Nonces are found
Definition:
pit-entry.hpp:53
nfd::pit::Entry::m_unsatisfyTimer
scheduler::EventId m_unsatisfyTimer
Definition:
pit-entry.hpp:167
nfd::name_tree::Entry
Name Tree Entry Class.
Definition:
name-tree-entry.hpp:65
ndnSIM
NFD
daemon
table
pit-entry.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11