blob: f048e6e4e693c2c2580e5d7dc4e8e79952fe4718 [file] [log] [blame]
Alexander Afanasyevc74a6022011-08-15 20:01:35 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
Alexander Afanasyev98256102011-08-14 01:00:02 -07002/*
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -07003 * Copyright (c) 2011 University of California, Los Angeles
Alexander Afanasyev98256102011-08-14 01:00:02 -07004 *
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
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070017 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 * Ilya Moiseenko <iliamo@cs.ucla.edu>
Alexander Afanasyev98256102011-08-14 01:00:02 -070020 */
21
22#include "ns3/assert.h"
23
24#include "ccnx-route.h"
Alexander Afanasyevc74a6022011-08-15 20:01:35 -070025#include "ccnx-forwarding-strategy.h"
Alexander Afanasyev98256102011-08-14 01:00:02 -070026
27namespace ns3 {
28
Alexander Afanasyevc74a6022011-08-15 20:01:35 -070029NS_OBJECT_ENSURE_REGISTERED (CcnxForwardingStrategy);
Alexander Afanasyev98256102011-08-14 01:00:02 -070030
Alexander Afanasyevc74a6022011-08-15 20:01:35 -070031TypeId CcnxForwardingStrategy::GetTypeId (void)
Alexander Afanasyev98256102011-08-14 01:00:02 -070032{
Alexander Afanasyevc74a6022011-08-15 20:01:35 -070033 static TypeId tid = TypeId ("ns3::CcnxForwardingStrategy")
Alexander Afanasyev070aa482011-08-20 00:38:25 -070034 .SetGroupName ("Ccnx")
Alexander Afanasyev98256102011-08-14 01:00:02 -070035 .SetParent<Object> ()
36 ;
37 return tid;
38}
39
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070040CcnxForwardingStrategy::CcnxForwardingStrategy ()
Alexander Afanasyev98256102011-08-14 01:00:02 -070041{
Alexander Afanasyev98256102011-08-14 01:00:02 -070042}
43
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070044void
Ilya Moiseenkoea27f4e2011-10-28 13:19:07 -070045CcnxForwardingStrategy::SetPit(Ptr<CcnxPit> pit)
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070046{
Ilya Moiseenkoea27f4e2011-10-28 13:19:07 -070047 m_pit = pit;
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070048}
49
Ilya Moiseenkoea27f4e2011-10-28 13:19:07 -070050Ptr<CcnxPit>
51CcnxForwardingStrategy::GetPit()
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070052{
Ilya Moiseenkoea27f4e2011-10-28 13:19:07 -070053 return m_pit;
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070054}
55
Alexander Afanasyev98256102011-08-14 01:00:02 -070056} //namespace ns3