Ilya Moiseenko | 098dd76 | 2012-01-11 19:57:48 -0800 | [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: Ilya Moiseenko <iliamo@cs.ucla.edu> |
| 19 | * Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 20 | */ |
| 21 | |
| 22 | #ifndef CCNX_HIJACKER_H |
| 23 | #define CCNX_HIJACKER_H |
| 24 | |
| 25 | #include "ccnx-app.h" |
| 26 | |
| 27 | #include "ns3/ptr.h" |
| 28 | #include "ns3/ccnx-name-components.h" |
| 29 | |
| 30 | namespace ns3 |
| 31 | { |
| 32 | |
| 33 | class CcnxHijacker : public CcnxApp |
| 34 | { |
| 35 | public: |
| 36 | static TypeId |
| 37 | GetTypeId (void); |
| 38 | |
| 39 | CcnxHijacker (); |
| 40 | |
| 41 | // inherited from CcnxApp |
| 42 | void OnInterest (const Ptr<const CcnxInterestHeader> &interest); |
| 43 | |
| 44 | protected: |
| 45 | // inherited from Application base class. |
| 46 | virtual void |
| 47 | StartApplication (); // Called at time specified by Start |
| 48 | |
| 49 | virtual void |
| 50 | StopApplication (); // Called at time specified by Stop |
| 51 | |
| 52 | private: |
| 53 | CcnxNameComponents m_prefix; |
| 54 | uint32_t m_virtualPayloadSize; |
| 55 | |
| 56 | TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, |
| 57 | Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedContentObjects; |
| 58 | }; |
| 59 | |
| 60 | } |
| 61 | |
| 62 | #endif // CCNX_HIJACKER_H |