blob: 84d9070212d424acebf97a5395041144d170ffd2 [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
32class Hijacker : public ndn::App
33{
34public:
35 static TypeId
36 GetTypeId ();
37
38 Hijacker ();
39
40 // Receive all Interests but do nothing in response
41 void
42 OnInterest (const Ptr<const ndn::InterestHeader> &interest, Ptr<Packet> packet);
43
44protected:
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_