blob: fd6ac5f076b8fa4f5c7cb26df9aec883ec0f2af4 [file] [log] [blame]
Junxiao Shid3c792f2014-01-30 00:46:13 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Alexander Afanasyev9bcbc7c2014-04-06 19:37:37 -07003 * Copyright (c) 2014 Regents of the University of California,
4 * Arizona Board of Regents,
5 * Colorado State University,
6 * University Pierre & Marie Curie, Sorbonne University,
7 * Washington University in St. Louis,
8 * Beijing Institute of Technology
9 *
10 * This file is part of NFD (Named Data Networking Forwarding Daemon).
11 * See AUTHORS.md for complete list of NFD authors and contributors.
12 *
13 * NFD is free software: you can redistribute it and/or modify it under the terms
14 * of the GNU General Public License as published by the Free Software Foundation,
15 * either version 3 of the License, or (at your option) any later version.
16 *
17 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
18 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 * PURPOSE. See the GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along with
22 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
23 **/
Junxiao Shid3c792f2014-01-30 00:46:13 -070024
25#include "strategy.hpp"
Junxiao Shi8c8d2182014-01-30 22:33:00 -070026#include "forwarder.hpp"
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060027#include "core/logger.hpp"
Junxiao Shid3c792f2014-01-30 00:46:13 -070028
29namespace nfd {
Junxiao Shi8c8d2182014-01-30 22:33:00 -070030namespace fw {
Junxiao Shid3c792f2014-01-30 00:46:13 -070031
Junxiao Shi679e9272014-02-15 20:10:21 -070032NFD_LOG_INIT("Strategy");
33
Junxiao Shibb5105f2014-03-03 12:06:45 -070034Strategy::Strategy(Forwarder& forwarder, const Name& name)
35 : m_name(name)
36 , m_forwarder(forwarder)
Junxiao Shi7bb01512014-03-05 21:34:09 -070037 , m_measurements(m_forwarder.getMeasurements(),
38 m_forwarder.getStrategyChoice(), this)
Junxiao Shid3c792f2014-01-30 00:46:13 -070039{
40}
41
42Strategy::~Strategy()
43{
44}
45
Junxiao Shi679e9272014-02-15 20:10:21 -070046void
Junxiao Shi22be22c2014-02-16 22:53:48 -070047Strategy::beforeSatisfyPendingInterest(shared_ptr<pit::Entry> pitEntry,
48 const Face& inFace, const Data& data)
49{
50 NFD_LOG_DEBUG("beforeSatisfyPendingInterest pitEntry=" << pitEntry->getName() <<
51 " inFace=" << inFace.getId() << " data=" << data.getName());
52}
53
54void
Junxiao Shi679e9272014-02-15 20:10:21 -070055Strategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry)
56{
57 NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName());
58}
59
Junxiao Shi22be22c2014-02-16 22:53:48 -070060//void
61//Strategy::afterAddFibEntry(shared_ptr<fib::Entry> fibEntry)
62//{
63// NFD_LOG_DEBUG("afterAddFibEntry fibEntry=" << fibEntry->getPrefix());
64//}
65//
66//void
67//Strategy::afterUpdateFibEntry(shared_ptr<fib::Entry> fibEntry)
68//{
69// NFD_LOG_DEBUG("afterUpdateFibEntry fibEntry=" << fibEntry->getPrefix());
70//}
71//
72//void
73//Strategy::beforeRemoveFibEntry(shared_ptr<fib::Entry> fibEntry)
74//{
75// NFD_LOG_DEBUG("beforeRemoveFibEntry fibEntry=" << fibEntry->getPrefix());
76//}
Junxiao Shid3c792f2014-01-30 00:46:13 -070077
Junxiao Shi8c8d2182014-01-30 22:33:00 -070078} // namespace fw
Junxiao Shid3c792f2014-01-30 00:46:13 -070079} // namespace nfd