NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ndnSIM
ndnSIM documentation
All Attributes
All GlobalValues
All LogComponents
All TraceSources
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
pit.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_HPP
27
#define NFD_DAEMON_TABLE_PIT_HPP
28
29
#include "
pit-entry.hpp
"
30
#include "
pit-iterator.hpp
"
31
32
namespace
nfd
{
33
namespace
pit {
34
42
typedef
std::vector<shared_ptr<Entry>>
DataMatchResult
;
43
46
class
Pit
: noncopyable
47
{
48
public
:
49
explicit
50
Pit
(
NameTree
& nameTree);
51
54
size_t
55
size
()
const
56
{
57
return
m_nItems;
58
}
59
64
shared_ptr<Entry>
65
find
(
const
Interest
& interest)
const
66
{
67
return
const_cast<
Pit
*
>
(
this
)->findOrInsert(interest,
false
).first;
68
}
69
75
std::pair<shared_ptr<Entry>,
bool
>
76
insert
(
const
Interest
& interest)
77
{
78
return
this->findOrInsert(interest,
true
);
79
}
80
84
DataMatchResult
85
findAllDataMatches
(
const
Data
& data)
const
;
86
89
void
90
erase
(
Entry
* entry)
91
{
92
this->
erase
(entry,
true
);
93
}
94
97
void
98
deleteInOutRecords
(
Entry
* entry,
const
Face
&
face
);
99
100
public
:
// enumeration
101
typedef
Iterator
const_iterator
;
102
108
const_iterator
109
begin
()
const
;
110
114
const_iterator
115
end
()
const
116
{
117
return
Iterator
();
118
}
119
120
private
:
121
void
122
erase
(
Entry
* pitEntry,
bool
canDeleteNte);
123
132
std::pair<shared_ptr<Entry>,
bool
>
133
findOrInsert(
const
Interest
& interest,
bool
allowInsert);
134
135
private
:
136
NameTree
& m_nameTree;
137
size_t
m_nItems;
138
};
139
140
}
// namespace pit
141
142
using
pit::Pit
;
143
144
}
// namespace nfd
145
146
#endif // NFD_DAEMON_TABLE_PIT_HPP
pit-iterator.hpp
nfd::pit::Pit::erase
void erase(Entry *entry)
deletes an entry
Definition:
pit.hpp:90
nfd::pit::Pit::find
shared_ptr< Entry > find(const Interest &interest) const
finds a PIT entry for Interest
Definition:
pit.hpp:65
nfd::pit::Pit::deleteInOutRecords
void deleteInOutRecords(Entry *entry, const Face &face)
deletes in-record and out-record for face
Definition:
pit.cpp:117
nfd::pit::Pit::end
const_iterator end() const
Definition:
pit.hpp:115
nfd::pit::Iterator
PIT iterator.
Definition:
pit-iterator.hpp:37
nfd::name_tree::NameTree
NameTree
Definition:
name-tree.cpp:36
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
nfd::pit::Pit::const_iterator
Iterator const_iterator
Definition:
pit.hpp:101
nfd::pit::Pit
represents the Interest Table
Definition:
pit.hpp:46
Face
ndn Face
Definition:
face-impl.hpp:41
pit-entry.hpp
nfd::pit::Pit::begin
const_iterator begin() const
Definition:
pit.cpp:128
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::pit::Entry
an Interest table entry
Definition:
pit-entry.hpp:57
nfd::pit::Pit::insert
std::pair< shared_ptr< Entry >, bool > insert(const Interest &interest)
inserts a PIT entry for Interest
Definition:
pit.hpp:76
nfd::pit::Pit::size
size_t size() const
Definition:
pit.hpp:55
face
nfd::pit::Pit::Pit
Pit(NameTree &nameTree)
Definition:
pit.cpp:37
ndn::Data
Represents a Data packet.
Definition:
data.hpp:35
nfd::pit::DataMatchResult
std::vector< shared_ptr< Entry > > DataMatchResult
Definition:
pit.hpp:42
nfd::pit::Pit::findAllDataMatches
DataMatchResult findAllDataMatches(const Data &data) const
performs a Data match
Definition:
pit.cpp:88
ndnSIM
NFD
daemon
table
pit.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11