NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
asf-strategy.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FW_ASF_STRATEGY_HPP
27
#define NFD_DAEMON_FW_ASF_STRATEGY_HPP
28
29
#include "
asf-measurements.hpp
"
30
#include "
asf-probing-module.hpp
"
31
#include "
fw/retx-suppression-exponential.hpp
"
32
#include "
fw/strategy.hpp
"
33
34
namespace
nfd
{
35
namespace
fw {
36
namespace
asf {
37
44
class
AsfStrategy
:
public
Strategy
45
{
46
public
:
47
explicit
48
AsfStrategy
(
Forwarder
& forwarder,
const
Name
&
name
=
STRATEGY_NAME
);
49
50
public
:
// triggers
51
virtual
void
52
afterReceiveInterest
(
const
Face
& inFace,
const
Interest
& interest,
53
const
shared_ptr<pit::Entry>& pitEntry)
override
;
54
55
virtual
void
56
beforeSatisfyInterest
(
const
shared_ptr<pit::Entry>& pitEntry,
57
const
Face
& inFace,
const
Data
& data)
override
;
58
59
virtual
void
60
afterReceiveNack
(
const
Face
& inFace,
const
lp::Nack
& nack,
61
const
shared_ptr<pit::Entry>& pitEntry)
override
;
62
63
private
:
64
void
65
forwardInterest(
const
Interest
& interest,
66
const
fib::Entry
& fibEntry,
67
const
shared_ptr<pit::Entry>& pitEntry,
68
Face
& outFace,
69
bool
wantNewNonce =
false
);
70
71
Face
*
72
getBestFaceForForwarding(
const
fib::Entry
& fibEntry,
const
Interest
& interest,
const
Face
& inFace);
73
74
void
75
onTimeout(
const
Name
& interestName,
face::FaceId
faceId);
76
77
void
78
sendNoRouteNack(
const
Face
& inFace,
const
Interest
& interest,
const
shared_ptr<pit::Entry>& pitEntry);
79
80
public
:
81
static
const
Name
STRATEGY_NAME
;
82
83
private
:
84
AsfMeasurements
m_measurements;
85
ProbingModule
m_probing;
86
87
private
:
88
RetxSuppressionExponential
m_retxSuppression;
89
90
static
const
time::milliseconds RETX_SUPPRESSION_INITIAL;
91
static
const
time::milliseconds RETX_SUPPRESSION_MAX;
92
};
93
94
}
// namespace asf
95
96
using
asf::AsfStrategy
;
97
98
}
// namespace fw
99
}
// namespace nfd
100
101
#endif // NFD_DAEMON_FW_ASF_STRATEGY_HPP
nfd::fw::asf::AsfStrategy::beforeSatisfyInterest
virtual void beforeSatisfyInterest(const shared_ptr< pit::Entry > &pitEntry, const Face &inFace, const Data &data) override
trigger before PIT entry is satisfied
Definition:
asf-strategy.cpp:103
nfd::fw::asf::AsfMeasurements
Helper class to retrieve and create strategy measurements.
Definition:
asf-measurements.hpp:279
nfd::fw::asf::AsfStrategy::AsfStrategy
AsfStrategy(Forwarder &forwarder, const Name &name=STRATEGY_NAME)
Definition:
asf-strategy.cpp:42
asf-probing-module.hpp
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
nfd::fib::Entry
represents a FIB entry
Definition:
fib-entry.hpp:51
retx-suppression-exponential.hpp
nfd::Forwarder
main class of NFD
Definition:
forwarder.hpp:54
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
nfd::fw::asf::ProbingModule
ASF Probing Module.
Definition:
asf-probing-module.hpp:37
ndn::lp::Nack
represents a Network Nack
Definition:
nack.hpp:40
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::fw::asf::AsfStrategy::STRATEGY_NAME
static const Name STRATEGY_NAME
Definition:
asf-strategy.hpp:81
nfd::fw::asf::AsfStrategy
AsfStrategy
Definition:
asf-strategy.cpp:34
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
strategy.hpp
nfd::fw::Strategy
represents a forwarding strategy
Definition:
strategy.hpp:38
nfd::fw::asf::AsfStrategy::afterReceiveNack
virtual void afterReceiveNack(const Face &inFace, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Nack is received
Definition:
asf-strategy.cpp:126
nfd::fw::asf::AsfStrategy::afterReceiveInterest
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
Definition:
asf-strategy.cpp:53
asf-measurements.hpp
nfd::face::FaceId
uint64_t FaceId
identifies a face
Definition:
face.hpp:39
ndn::Data
represents a Data packet
Definition:
data.hpp:37
nfd::fw::RetxSuppressionExponential
a retransmission suppression decision algorithm that suppresses retransmissions using exponential bac...
Definition:
retx-suppression-exponential.hpp:40
nfd::fw::asf::AsfStrategy
Adaptive SRTT-based Forwarding Strategy.
Definition:
asf-strategy.hpp:44
ndn::name
Definition:
name-component.cpp:36
ndnSIM
NFD
daemon
fw
asf-strategy.hpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13