Alexander Afanasyev | c3cc0b3 | 2012-12-12 18:41:20 -0800 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2011-2012 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 | */ |
| 20 | |
| 21 | // hijacker.h |
| 22 | |
| 23 | #ifndef HIJACKER_H_ |
| 24 | #define HIJACKER_H_ |
| 25 | |
| 26 | #include "ns3/core-module.h" |
| 27 | #include "ns3/network-module.h" |
| 28 | #include "ns3/ndnSIM-module.h" |
| 29 | |
| 30 | namespace ns3 { |
| 31 | |
| 32 | class Hijacker : public ndn::App |
| 33 | { |
| 34 | public: |
| 35 | static TypeId |
| 36 | GetTypeId (); |
| 37 | |
| 38 | Hijacker (); |
| 39 | |
| 40 | // Receive all Interests but do nothing in response |
| 41 | void |
Alexander Afanasyev | eae83ee | 2013-03-15 15:01:10 -0700 | [diff] [blame] | 42 | OnInterest (const Ptr<const ndn::Interest> &interest, Ptr<Packet> packet); |
Alexander Afanasyev | c3cc0b3 | 2012-12-12 18:41:20 -0800 | [diff] [blame] | 43 | |
| 44 | protected: |
| 45 | // inherited from Application base class. |
| 46 | virtual void |
| 47 | StartApplication (); |
| 48 | |
| 49 | virtual void |
| 50 | StopApplication (); |
| 51 | }; |
| 52 | |
| 53 | } // namespace ns3 |
| 54 | |
| 55 | #endif // HIJACKER_H_ |