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
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
i
k
l
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
retx-suppression-fixed.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
retx-suppression-fixed.hpp
"
27
#include "
algorithm.hpp
"
28
29
namespace
nfd
{
30
namespace
fw {
31
32
const
time::milliseconds
RetxSuppressionFixed::DEFAULT_MIN_RETX_INTERVAL
(100);
33
34
RetxSuppressionFixed::RetxSuppressionFixed
(
const
time::milliseconds& minRetxInterval)
35
: m_minRetxInterval(minRetxInterval)
36
{
37
BOOST_ASSERT(minRetxInterval > time::milliseconds::zero());
38
}
39
40
RetxSuppression::Result
41
RetxSuppressionFixed::decide
(
const
Face
& inFace,
const
Interest
& interest,
42
pit::Entry
& pitEntry)
const
43
{
44
bool
isNewPitEntry = !
hasPendingOutRecords
(pitEntry);
45
if
(isNewPitEntry) {
46
return
NEW
;
47
}
48
49
time::steady_clock::TimePoint
lastOutgoing = this->
getLastOutgoing
(pitEntry);
50
time::steady_clock::TimePoint
now =
time::steady_clock::now
();
51
time::steady_clock::Duration
sinceLastOutgoing = now - lastOutgoing;
52
bool
shouldSuppress = sinceLastOutgoing < m_minRetxInterval;
53
return
shouldSuppress ?
SUPPRESS
:
FORWARD
;
54
}
55
56
}
// namespace fw
57
}
// namespace nfd
ndn::time::steady_clock::TimePoint
time_point TimePoint
Definition:
time.hpp:120
nfd::fw::RetxSuppressionFixed::DEFAULT_MIN_RETX_INTERVAL
static const time::milliseconds DEFAULT_MIN_RETX_INTERVAL
Definition:
retx-suppression-fixed.hpp:51
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
ndn::time::steady_clock::now
static time_point now() noexcept
Definition:
time.cpp:79
nfd::fw::RetxSuppressionFixed::decide
virtual Result decide(const Face &inFace, const Interest &interest, pit::Entry &pitEntry) const override
determines whether Interest is a retransmission, and if so, whether it shall be forwarded or suppress...
Definition:
retx-suppression-fixed.cpp:41
retx-suppression-fixed.hpp
nfd::fw::RetxSuppression::SUPPRESS
Interest is retransmission and should be suppressed.
Definition:
retx-suppression.hpp:50
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
nfd::fw::RetxSuppression::NEW
Interest is new (not a retransmission)
Definition:
retx-suppression.hpp:42
nfd::fw::RetxSuppression::getLastOutgoing
time::steady_clock::TimePoint getLastOutgoing(const pit::Entry &pitEntry) const
Definition:
retx-suppression.cpp:32
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::fw::hasPendingOutRecords
bool hasPendingOutRecords(const pit::Entry &pitEntry)
determine whether pitEntry has any pending out-records
Definition:
algorithm.cpp:136
algorithm.hpp
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
nfd::fw::RetxSuppression::FORWARD
Interest is retransmission and should be forwarded.
Definition:
retx-suppression.hpp:46
ndn::time::steady_clock::Duration
duration Duration
Definition:
time.hpp:121
nfd::fw::RetxSuppressionFixed::RetxSuppressionFixed
RetxSuppressionFixed(const time::milliseconds &minRetxInterval=DEFAULT_MIN_RETX_INTERVAL)
Definition:
retx-suppression-fixed.cpp:34
nfd::fw::RetxSuppression::Result
Result
Definition:
retx-suppression.hpp:39
ndnSIM
NFD
daemon
fw
retx-suppression-fixed.cpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13