Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
Alexander Afanasyev | 60a7b62 | 2014-12-20 17:04:07 -0800 | [diff] [blame] | 3 | * Copyright (c) 2011-2015 Regents of the University of California. |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame] | 4 | * |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 5 | * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and |
| 6 | * contributors. |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame] | 7 | * |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 8 | * 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 Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 19 | |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 20 | #ifndef NDNSIM_NDN_COMMON_H |
| 21 | #define NDNSIM_NDN_COMMON_H |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 22 | |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 23 | #include "ns3/nstime.h" |
| 24 | #include "ns3/simulator.h" |
Alexander Afanasyev | 82d5ffe | 2014-12-30 23:55:38 -0800 | [diff] [blame] | 25 | #include "ns3/attribute.h" |
| 26 | #include "ns3/attribute-helper.h" |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 27 | |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 28 | #include <ndn-cxx/interest.hpp> |
| 29 | #include <ndn-cxx/encoding/block.hpp> |
| 30 | #include <ndn-cxx/signature.hpp> |
| 31 | #include <ndn-cxx/signature-info.hpp> |
| 32 | #include <ndn-cxx/name.hpp> |
| 33 | #include <ndn-cxx/data.hpp> |
| 34 | #include <ndn-cxx/security/key-chain.hpp> |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 35 | |
Spyridon Mastorakis | 1f1cd5e | 2014-12-04 11:12:40 -0800 | [diff] [blame] | 36 | #include <ndn-cxx/util/time.hpp> |
| 37 | |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 38 | #include "NFD/daemon/face/face.hpp" |
| 39 | |
Alexander Afanasyev | 5713e7a | 2015-01-02 01:08:18 -0800 | [diff] [blame] | 40 | namespace nfd { |
| 41 | } |
| 42 | |
Alexander Afanasyev | 7920651 | 2013-07-27 16:49:12 -0700 | [diff] [blame] | 43 | namespace ns3 { |
Alexander Afanasyev | 7920651 | 2013-07-27 16:49:12 -0700 | [diff] [blame] | 44 | namespace ndn { |
Alexander Afanasyev | 7920651 | 2013-07-27 16:49:12 -0700 | [diff] [blame] | 45 | |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 46 | using ::ndn::Name; |
| 47 | namespace name = ::ndn::name; |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 48 | |
Alexander Afanasyev | 82d5ffe | 2014-12-30 23:55:38 -0800 | [diff] [blame] | 49 | ATTRIBUTE_HELPER_HEADER(Name); |
| 50 | |
Spyridon Mastorakis | 86edf6f | 2014-11-14 19:27:18 -0800 | [diff] [blame] | 51 | namespace time { |
| 52 | using namespace ::ndn::time; |
| 53 | } |
Spyridon Mastorakis | 1f1cd5e | 2014-12-04 11:12:40 -0800 | [diff] [blame] | 54 | |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 55 | namespace lp { |
| 56 | using namespace ::ndn::lp; |
| 57 | } |
| 58 | |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 59 | using std::shared_ptr; |
| 60 | using std::make_shared; |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 61 | |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 62 | using ::ndn::Interest; |
| 63 | using ::ndn::Data; |
| 64 | using ::ndn::KeyLocator; |
| 65 | using ::ndn::Signature; |
| 66 | using ::ndn::SignatureInfo; |
| 67 | using ::ndn::Block; |
| 68 | using ::ndn::KeyChain; |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 69 | |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 70 | using ::nfd::Face; |
Spyridon Mastorakis | f6d3285 | 2017-09-27 20:28:52 -0700 | [diff] [blame] | 71 | using ::ndn::FaceUri; |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 72 | |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 73 | #ifndef DOXYGEN |
| 74 | // For python bindings |
Alexander Afanasyev | 5713e7a | 2015-01-02 01:08:18 -0800 | [diff] [blame] | 75 | namespace nfd = ::nfd; |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 76 | #endif // DOXYGEN |
Alexander Afanasyev | 5713e7a | 2015-01-02 01:08:18 -0800 | [diff] [blame] | 77 | |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 78 | using ::ndn::make_unique; |
| 79 | |
Spyridon Mastorakis | 53e922f | 2014-10-17 17:29:26 -0700 | [diff] [blame] | 80 | } // namespace ndn |
| 81 | } // namespace ns3 |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 82 | |
Xuxiang Tian | 9101873 | 2016-08-17 16:24:47 -0700 | [diff] [blame] | 83 | namespace nfd { |
| 84 | namespace face { |
| 85 | |
| 86 | inline std::ostream& |
| 87 | operator<<(std::ostream& os, const Face& face) |
| 88 | { |
| 89 | os << face.getLocalUri(); |
| 90 | return os; |
| 91 | } |
| 92 | |
| 93 | } // namespace face |
| 94 | } // namespace nfd |
| 95 | |
| 96 | #endif // NDNSIM_NDN_COMMON_H |