blob: 0af1432c82d6ecf6338732f556897360a8179d8d [file] [log] [blame]
Alexander Afanasyev4aac5572012-08-09 10:49:55 -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 * Ilya Moiseenko <iliamo@cs.ucla.edu>
20 *
21 */
22
Alexander Afanasyev0c395372014-12-20 15:54:02 -080023#include "ndn-app-face.hpp"
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070024
25#include "ns3/log.h"
26#include "ns3/packet.h"
27#include "ns3/node.h"
28#include "ns3/assert.h"
29#include "ns3/simulator.h"
30
Spyridon Mastorakise4f0d3c2014-10-29 13:20:03 -070031#include "apps/ndn-app.hpp"
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070032
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080033NS_LOG_COMPONENT_DEFINE("ndn.AppFace");
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070034
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070035namespace ns3 {
36namespace ndn {
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070037
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080038AppFace::AppFace(Ptr<App> app)
Spyridon Mastorakise4f0d3c2014-10-29 13:20:03 -070039 // : Face(app->GetNode())
40 : m_app(app)
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070041{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080042 NS_LOG_FUNCTION(this << app);
43
44 NS_ASSERT(m_app != 0);
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070045}
46
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080047AppFace::~AppFace()
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070048{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080049 NS_LOG_FUNCTION_NOARGS();
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070050}
51
Alexander Afanasyev5bee19e2013-07-10 14:33:57 -070052bool
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070053AppFace::SendInterest(shared_ptr<const Interest> interest)
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070054{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080055 NS_LOG_FUNCTION(this << interest);
Spyridon Mastorakise4f0d3c2014-10-29 13:20:03 -070056 return false;
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070057}
58
59bool
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070060AppFace::SendData(shared_ptr<const Data> data)
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070061{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080062 NS_LOG_FUNCTION(this << data);
Spyridon Mastorakise4f0d3c2014-10-29 13:20:03 -070063 return false;
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070064}
65
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070066} // namespace ndn
67} // namespace ns3