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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
strategy.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
strategy.hpp
"
27
#include "
forwarder.hpp
"
28
#include "
core/logger.hpp
"
29
30
namespace
nfd {
31
namespace
fw {
32
33
NFD_LOG_INIT
(
"Strategy"
);
34
35
Strategy::Strategy
(
Forwarder
& forwarder,
const
Name
& name)
36
: afterAddFace(forwarder.getFaceTable().onAdd)
37
, beforeRemoveFace(forwarder.getFaceTable().onRemove)
38
, m_name(name)
39
, m_forwarder(forwarder)
40
, m_measurements(m_forwarder.getMeasurements(),
41
m_forwarder.getStrategyChoice(), this)
42
{
43
}
44
45
Strategy::~Strategy
()
46
{
47
}
48
49
void
50
Strategy::beforeSatisfyInterest
(shared_ptr<pit::Entry> pitEntry,
51
const
Face
& inFace,
const
Data& data)
52
{
53
NFD_LOG_DEBUG
(
"beforeSatisfyInterest pitEntry="
<< pitEntry->getName() <<
54
" inFace="
<< inFace.
getId
() <<
" data="
<< data.getName());
55
}
56
57
void
58
Strategy::beforeExpirePendingInterest
(shared_ptr<pit::Entry> pitEntry)
59
{
60
NFD_LOG_DEBUG
(
"beforeExpirePendingInterest pitEntry="
<< pitEntry->getName());
61
}
62
63
//void
64
//Strategy::afterAddFibEntry(shared_ptr<fib::Entry> fibEntry)
65
//{
66
// NFD_LOG_DEBUG("afterAddFibEntry fibEntry=" << fibEntry->getPrefix());
67
//}
68
//
69
//void
70
//Strategy::afterUpdateFibEntry(shared_ptr<fib::Entry> fibEntry)
71
//{
72
// NFD_LOG_DEBUG("afterUpdateFibEntry fibEntry=" << fibEntry->getPrefix());
73
//}
74
//
75
//void
76
//Strategy::beforeRemoveFibEntry(shared_ptr<fib::Entry> fibEntry)
77
//{
78
// NFD_LOG_DEBUG("beforeRemoveFibEntry fibEntry=" << fibEntry->getPrefix());
79
//}
80
81
}
// namespace fw
82
}
// namespace nfd
NFD_LOG_DEBUG
#define NFD_LOG_DEBUG(expression)
Definition:
logger.hpp:36
nfd::fw::Strategy::beforeSatisfyInterest
virtual void beforeSatisfyInterest(shared_ptr< pit::Entry > pitEntry, const Face &inFace, const Data &data)
trigger before PIT entry is satisfied
Definition:
strategy.cpp:50
nfd::Forwarder
main class of NFD
Definition:
forwarder.hpp:54
logger.hpp
nfd::Face
represents a face
Definition:
face.hpp:59
forwarder.hpp
nfd::fw::Strategy::beforeExpirePendingInterest
virtual void beforeExpirePendingInterest(shared_ptr< pit::Entry > pitEntry)
trigger before PIT entry expires
Definition:
strategy.cpp:58
nfd::fw::Strategy::~Strategy
virtual ~Strategy()
Definition:
strategy.cpp:45
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
nfd::fw::Strategy::Strategy
Strategy(Forwarder &forwarder, const Name &name)
construct a strategy instance
Definition:
strategy.cpp:35
strategy.hpp
NFD_LOG_INIT
#define NFD_LOG_INIT(name)
Definition:
logger.hpp:33
nfd::Face::getId
FaceId getId() const
Definition:
face.cpp:51
ndnSIM
NFD
daemon
fw
strategy.cpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7