blob: e07ccfde1e4f4bdfef819913c5315988d56f4262 [file] [log] [blame]
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -07001/* -*- 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: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 */
20
21#include "ccnx-pit.h"
Alexander Afanasyeve3d126f2012-07-16 17:07:31 -070022
23#include "ns3/ccnx-interest-header.h"
24#include "ns3/ccnx-content-object-header.h"
25
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070026#include "ns3/log.h"
Alexander Afanasyeva5bbe0e2011-11-22 17:28:39 -080027#include "ns3/string.h"
Alexander Afanasyev3a4a0b32012-06-28 14:14:22 -070028#include "ns3/uinteger.h"
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070029#include "ns3/simulator.h"
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070030
Alexander Afanasyevf034cbd2012-06-29 14:28:31 -070031#include <boost/lambda/bind.hpp>
Alexander Afanasyeva5bbe0e2011-11-22 17:28:39 -080032#include <boost/lambda/lambda.hpp>
33
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070034NS_LOG_COMPONENT_DEFINE ("CcnxPit");
35
36namespace ns3 {
37
Alexander Afanasyevd02a5d62011-11-21 11:01:51 -080038NS_OBJECT_ENSURE_REGISTERED (CcnxPit);
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070039
40using namespace __ccnx_private;
41
Alexander Afanasyeva46844b2011-11-21 19:13:26 -080042TypeId
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070043CcnxPit::GetTypeId ()
44{
Alexander Afanasyev11f7bb42012-07-09 17:06:30 -070045 static TypeId tid = TypeId ("ns3::private::CcnxPit")
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070046 .SetGroupName ("Ccnx")
47 .SetParent<Object> ()
Alexander Afanasyevf9f4eb02011-12-16 01:51:14 -080048
Alexander Afanasyeva46844b2011-11-21 19:13:26 -080049 .AddAttribute ("PitEntryPruningTimout",
50 "Timeout for PIT entry to live after being satisfied. To make sure recently satisfied interest will not be satisfied again",
51 StringValue ("100ms"),
52 MakeTimeAccessor (&CcnxPit::m_PitEntryPruningTimout),
53 MakeTimeChecker ())
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070054 ;
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070055
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070056 return tid;
57}
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070058
59CcnxPit::CcnxPit ()
60{
61}
62
Alexander Afanasyevd02a5d62011-11-21 11:01:51 -080063CcnxPit::~CcnxPit ()
64{
Alexander Afanasyevd02a5d62011-11-21 11:01:51 -080065}
66
Alexander Afanasyeva98cdd22011-08-29 17:32:37 -070067} // namespace ns3