NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
asf-probing-module.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_PROBING_MODULE_HPP
27
#define NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
28
29
#include "
asf-measurements.hpp
"
30
31
namespace
nfd
{
32
namespace
fw {
33
namespace
asf {
34
37
class
ProbingModule
38
{
39
public
:
40
explicit
41
ProbingModule
(
AsfMeasurements
& measurements);
42
43
void
44
scheduleProbe
(
const
fib::Entry
& fibEntry,
const
time::milliseconds& interval);
45
46
Face
*
47
getFaceToProbe
(
const
Face
& inFace,
48
const
Interest
& interest,
49
const
fib::Entry
& fibEntry,
50
const
Face
& faceUsed);
51
52
bool
53
isProbingNeeded
(
const
fib::Entry
& fibEntry,
const
Interest
& interest);
54
55
void
56
afterForwardingProbe
(
const
fib::Entry
& fibEntry,
const
Interest
& interest);
57
58
private
:
59
// Used to associate FaceInfo with the face in a NextHop
60
typedef
std::pair<FaceInfo*, Face*> FaceInfoFacePair;
61
typedef
std::function<bool(FaceInfoFacePair, FaceInfoFacePair)> FaceInfoPredicate;
62
typedef
std::set<FaceInfoFacePair, FaceInfoPredicate> FaceInfoFacePairSet;
63
64
Face
*
65
getFaceBasedOnProbability(
const
FaceInfoFacePairSet& rankedFaces);
66
67
double
68
getProbingProbability(uint64_t rank, uint64_t rankSum, uint64_t nFaces);
69
70
double
71
getRandomNumber(
double
start,
double
end);
72
73
public
:
74
static
constexpr time::seconds
DEFAULT_PROBING_INTERVAL
= time::seconds(60);
75
76
private
:
77
time::seconds m_probingInterval;
78
AsfMeasurements
& m_measurements;
79
};
80
81
}
// namespace asf
82
}
// namespace fw
83
}
// namespace nfd
84
85
#endif // NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
nfd::fw::asf::AsfMeasurements
Helper class to retrieve and create strategy measurements.
Definition:
asf-measurements.hpp:279
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
nfd::fib::Entry
represents a FIB entry
Definition:
fib-entry.hpp:51
nfd::fw::asf::ProbingModule::ProbingModule
ProbingModule(AsfMeasurements &measurements)
Definition:
asf-probing-module.cpp:38
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
nfd::fw::asf::ProbingModule
ASF Probing Module.
Definition:
asf-probing-module.hpp:37
nfd::fw::asf::ProbingModule::isProbingNeeded
bool isProbingNeeded(const fib::Entry &fibEntry, const Interest &interest)
Definition:
asf-probing-module.cpp:112
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::fw::asf::ProbingModule::scheduleProbe
void scheduleProbe(const fib::Entry &fibEntry, const time::milliseconds &interval)
Definition:
asf-probing-module.cpp:45
nfd::fw::asf::ProbingModule::getFaceToProbe
Face * getFaceToProbe(const Face &inFace, const Interest &interest, const fib::Entry &fibEntry, const Face &faceUsed)
Definition:
asf-probing-module.cpp:65
nfd::fw::asf::ProbingModule::afterForwardingProbe
void afterForwardingProbe(const fib::Entry &fibEntry, const Interest &interest)
Definition:
asf-probing-module.cpp:130
nfd::fw::asf::ProbingModule::DEFAULT_PROBING_INTERVAL
static constexpr time::seconds DEFAULT_PROBING_INTERVAL
Definition:
asf-probing-module.hpp:74
asf-measurements.hpp
ndnSIM
NFD
daemon
fw
asf-probing-module.hpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13