blob: a794f120775af79a2b3b54a80654ade701cbacdc [file] [log] [blame]
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -08001/* -*- 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
30namespace ns3 {
31
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080032class Hijacker : public ndn::App {
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -080033public:
34 static TypeId
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080035 GetTypeId();
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -080036
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080037 Hijacker();
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -080038
39 // Receive all Interests but do nothing in response
40 void
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080041 OnInterest(Ptr<const ndn::Interest> interest);
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -080042
43protected:
44 // inherited from Application base class.
45 virtual void
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080046 StartApplication();
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -080047
48 virtual void
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080049 StopApplication();
Alexander Afanasyevc3cc0b32012-12-12 18:41:20 -080050};
51
52} // namespace ns3
53
54#endif // HIJACKER_H_