NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
content-store-nocache.cc
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  * Ilya Moiseenko <iliamo@cs.ucla.edu>
20  *
21  */
22 
23 #include "content-store-nocache.h"
24 #include "ns3/log.h"
25 #include "ns3/packet.h"
26 #include "ns3/ndn-name.h"
27 #include "ns3/ndn-interest.h"
28 #include "ns3/ndn-data.h"
29 
30 NS_LOG_COMPONENT_DEFINE ("ndn.cs.Nocache");
31 
32 namespace ns3 {
33 namespace ndn {
34 namespace cs {
35 
36 NS_OBJECT_ENSURE_REGISTERED (Nocache);
37 
38 TypeId
40 {
41  static TypeId tid = TypeId ("ns3::ndn::cs::Nocache")
42  .SetGroupName ("Ndn")
43  .SetParent<ContentStore> ()
44  .AddConstructor< Nocache > ()
45  ;
46 
47  return tid;
48 }
49 
51 {
52 }
53 
55 {
56 }
57 
58 Ptr<Data>
59 Nocache::Lookup (Ptr<const Interest> interest)
60 {
61  this->m_cacheMissesTrace (interest);
62  return 0;
63 }
64 
65 bool
66 Nocache::Add (Ptr<const Data> data)
67 {
68  return false;
69 }
70 
71 void
72 Nocache::Print (std::ostream &os) const
73 {
74 }
75 
76 uint32_t
78 {
79  return 0;
80 }
81 
82 Ptr<cs::Entry>
84 {
85  return 0;
86 }
87 
88 Ptr<cs::Entry>
90 {
91  return 0;
92 }
93 
94 Ptr<cs::Entry>
95 Nocache::Next (Ptr<cs::Entry>)
96 {
97  return 0;
98 }
99 
100 } // namespace cs
101 } // namespace ndn
102 } // namespace ns3
Base class for NDN content store.
TracedCallback< Ptr< const Interest > > m_cacheMissesTrace
trace of cache misses
virtual ~Nocache()
Virtual destructor.
virtual Ptr< cs::Entry > End()
Return item next after last (no order guaranteed)
virtual bool Add(Ptr< const Data > data)
Add a new content to the content store.
virtual Ptr< cs::Entry > Begin()
Return first element of content store (no order guaranteed)
virtual uint32_t GetSize() const
Get number of entries in content store.
Nocache()
Default constructor.
virtual Ptr< Data > Lookup(Ptr< const Interest > interest)
Find corresponding CS entry for the given interest.
static TypeId GetTypeId()
Interface ID.
virtual void Print(std::ostream &os) const
Print out content store entries.