blob: 849627b2ceab08dc9f38c85b952f1e98fb474ca0 [file] [log] [blame]
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08003 * Copyright (c) 2011-2015 Regents of the University of California.
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -08004 *
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -07005 * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
6 * contributors.
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -08007 *
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -07008 * ndnSIM is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
11 *
12 * ndnSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * ndnSIM, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 **/
Alexander Afanasyevb989b122013-07-10 17:15:46 -070019
Xuxiang Tian91018732016-08-17 16:24:47 -070020#ifndef NDNSIM_NDN_COMMON_H
21#define NDNSIM_NDN_COMMON_H
Alexander Afanasyevb989b122013-07-10 17:15:46 -070022
Alexander Afanasyev92136012013-07-16 20:36:30 -070023#include "ns3/nstime.h"
24#include "ns3/simulator.h"
Alexander Afanasyev82d5ffe2014-12-30 23:55:38 -080025#include "ns3/attribute.h"
26#include "ns3/attribute-helper.h"
Alexander Afanasyev92136012013-07-16 20:36:30 -070027
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070028#include <ndn-cxx/interest.hpp>
29#include <ndn-cxx/encoding/block.hpp>
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070030#include <ndn-cxx/signature-info.hpp>
31#include <ndn-cxx/name.hpp>
32#include <ndn-cxx/data.hpp>
33#include <ndn-cxx/security/key-chain.hpp>
Alexander Afanasyevb989b122013-07-10 17:15:46 -070034
Spyridon Mastorakis1f1cd5e2014-12-04 11:12:40 -080035#include <ndn-cxx/util/time.hpp>
36
Xuxiang Tian91018732016-08-17 16:24:47 -070037#include "NFD/daemon/face/face.hpp"
38
Alexander Afanasyev5713e7a2015-01-02 01:08:18 -080039namespace nfd {
40}
41
Alexander Afanasyev79206512013-07-27 16:49:12 -070042namespace ns3 {
Alexander Afanasyev79206512013-07-27 16:49:12 -070043namespace ndn {
Alexander Afanasyev79206512013-07-27 16:49:12 -070044
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070045using ::ndn::Name;
46namespace name = ::ndn::name;
Alexander Afanasyev92136012013-07-16 20:36:30 -070047
Alexander Afanasyev82d5ffe2014-12-30 23:55:38 -080048ATTRIBUTE_HELPER_HEADER(Name);
49
Spyridon Mastorakis86edf6f2014-11-14 19:27:18 -080050namespace time {
51using namespace ::ndn::time;
52}
Spyridon Mastorakis1f1cd5e2014-12-04 11:12:40 -080053
Xuxiang Tian91018732016-08-17 16:24:47 -070054namespace lp {
55using namespace ::ndn::lp;
56}
57
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070058using std::shared_ptr;
59using std::make_shared;
Alexander Afanasyev92136012013-07-16 20:36:30 -070060
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070061using ::ndn::Interest;
62using ::ndn::Data;
63using ::ndn::KeyLocator;
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070064using ::ndn::SignatureInfo;
65using ::ndn::Block;
66using ::ndn::KeyChain;
Alexander Afanasyev92136012013-07-16 20:36:30 -070067
Xuxiang Tian91018732016-08-17 16:24:47 -070068using ::nfd::Face;
Spyridon Mastorakisf6d32852017-09-27 20:28:52 -070069using ::ndn::FaceUri;
Xuxiang Tian91018732016-08-17 16:24:47 -070070
Alexander Afanasyev5dee3612015-08-25 16:09:04 -070071#ifndef DOXYGEN
72// For python bindings
Alexander Afanasyev5713e7a2015-01-02 01:08:18 -080073namespace nfd = ::nfd;
Alexander Afanasyev5dee3612015-08-25 16:09:04 -070074#endif // DOXYGEN
Alexander Afanasyev5713e7a2015-01-02 01:08:18 -080075
Xuxiang Tian91018732016-08-17 16:24:47 -070076using ::ndn::make_unique;
77
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070078} // namespace ndn
79} // namespace ns3
Alexander Afanasyev92136012013-07-16 20:36:30 -070080
Xuxiang Tian91018732016-08-17 16:24:47 -070081namespace nfd {
82namespace face {
83
84inline std::ostream&
85operator<<(std::ostream& os, const Face& face)
86{
87 os << face.getLocalUri();
88 return os;
89}
90
91} // namespace face
92} // namespace nfd
93
94#endif // NDNSIM_NDN_COMMON_H