Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 1 | /* -*- 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 Afanasyev | 786936a | 2012-07-17 19:48:15 -0700 | [diff] [blame] | 24 | #include "nacks.h" |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 25 | |
| 26 | namespace ns3 { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 27 | namespace ndn { |
| 28 | namespace fw { |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 29 | |
| 30 | /** |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 31 | * \ingroup ndn |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 32 | */ |
| 33 | class GreenYellowRed : |
Alexander Afanasyev | 786936a | 2012-07-17 19:48:15 -0700 | [diff] [blame] | 34 | public Nacks |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 35 | { |
| 36 | public: |
Alexander Afanasyev | 042b4a7 | 2012-11-09 17:47:48 -0800 | [diff] [blame] | 37 | static TypeId |
| 38 | GetTypeId (void); |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 39 | |
| 40 | protected: |
| 41 | virtual void |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 42 | WillSatisfyPendingInterest (Ptr<Face> inFace, |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 43 | Ptr<pit::Entry> pitEntry); |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 44 | |
| 45 | virtual bool |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 46 | DoPropagateInterest (Ptr<Face> inFace, |
Alexander Afanasyev | eae83ee | 2013-03-15 15:01:10 -0700 | [diff] [blame] | 47 | Ptr<const Interest> header, |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 48 | Ptr<const Packet> origPacket, |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 49 | Ptr<pit::Entry> pitEntry); |
Alexander Afanasyev | e6dc0ac | 2013-02-21 14:00:48 -0800 | [diff] [blame] | 50 | |
| 51 | virtual void |
| 52 | WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry); |
| 53 | |
Alexander Afanasyev | 786936a | 2012-07-17 19:48:15 -0700 | [diff] [blame] | 54 | virtual void |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 55 | DidReceiveValidNack (Ptr<Face> incomingFace, |
Alexander Afanasyev | 786936a | 2012-07-17 19:48:15 -0700 | [diff] [blame] | 56 | uint32_t nackCode, |
Alexander Afanasyev | eae83ee | 2013-03-15 15:01:10 -0700 | [diff] [blame] | 57 | Ptr<const Interest> header, |
Alexander Afanasyev | 0484e77 | 2012-10-29 11:02:08 -0700 | [diff] [blame] | 58 | Ptr<const Packet> origPacket, |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 59 | Ptr<pit::Entry> pitEntry); |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 60 | private: |
Alexander Afanasyev | 786936a | 2012-07-17 19:48:15 -0700 | [diff] [blame] | 61 | typedef Nacks super; |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 62 | }; |
| 63 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 64 | } // namespace fw |
| 65 | } // namespace ndn |
Alexander Afanasyev | 996b487 | 2012-07-17 17:07:56 -0700 | [diff] [blame] | 66 | } // namespace ns3 |
| 67 | |
| 68 | #endif // NDNSIM_GREEN_YELLOW_RED |