blob: 57f17ddabf3babae013048a6643f62722b51fe1d [file] [log] [blame]
Alexander Afanasyev996b4872012-07-17 17:07:56 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2011 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 * Ilya Moiseenko <iliamo@cs.ucla.edu>
20 */
21#ifndef NDNSIM_GREEN_YELLOW_RED_H
22#define NDNSIM_GREEN_YELLOW_RED_H
23
Alexander Afanasyev786936a2012-07-17 19:48:15 -070024#include "nacks.h"
Alexander Afanasyev996b4872012-07-17 17:07:56 -070025
26namespace ns3 {
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070027namespace ndn {
28namespace fw {
Alexander Afanasyev996b4872012-07-17 17:07:56 -070029
30/**
Alexander Afanasyev79206512013-07-27 16:49:12 -070031 * @ingroup ndn-fw
32 * @brief Forwarding strategy extensions to track simple link status based on data plane performance
Alexander Afanasyev996b4872012-07-17 17:07:56 -070033 */
34class GreenYellowRed :
Alexander Afanasyev786936a2012-07-17 19:48:15 -070035 public Nacks
Alexander Afanasyev996b4872012-07-17 17:07:56 -070036{
37public:
Alexander Afanasyev042b4a72012-11-09 17:47:48 -080038 static TypeId
39 GetTypeId (void);
Alexander Afanasyev996b4872012-07-17 17:07:56 -070040
41protected:
42 virtual void
Alexander Afanasyev31cb4692012-08-17 13:08:20 -070043 WillSatisfyPendingInterest (Ptr<Face> inFace,
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070044 Ptr<pit::Entry> pitEntry);
Alexander Afanasyev996b4872012-07-17 17:07:56 -070045
46 virtual bool
Alexander Afanasyev31cb4692012-08-17 13:08:20 -070047 DoPropagateInterest (Ptr<Face> inFace,
Alexander Afanasyevb989b122013-07-10 17:15:46 -070048 Ptr<const Interest> interest,
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070049 Ptr<pit::Entry> pitEntry);
Alexander Afanasyeve6dc0ac2013-02-21 14:00:48 -080050
51 virtual void
52 WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry);
53
Alexander Afanasyev786936a2012-07-17 19:48:15 -070054 virtual void
Alexander Afanasyev31cb4692012-08-17 13:08:20 -070055 DidReceiveValidNack (Ptr<Face> incomingFace,
Alexander Afanasyev786936a2012-07-17 19:48:15 -070056 uint32_t nackCode,
Alexander Afanasyevb989b122013-07-10 17:15:46 -070057 Ptr<const Interest> nack,
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070058 Ptr<pit::Entry> pitEntry);
Alexander Afanasyev996b4872012-07-17 17:07:56 -070059private:
Alexander Afanasyev786936a2012-07-17 19:48:15 -070060 typedef Nacks super;
Alexander Afanasyev996b4872012-07-17 17:07:56 -070061};
62
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070063} // namespace fw
64} // namespace ndn
Alexander Afanasyev996b4872012-07-17 17:07:56 -070065} // namespace ns3
66
67#endif // NDNSIM_GREEN_YELLOW_RED