Alexander Afanasyev | c169a81 | 2014-05-20 20:37:29 -0400 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 2 | /** |
Alexander Afanasyev | c169a81 | 2014-05-20 20:37:29 -0400 | [diff] [blame] | 3 | * Copyright (c) 2013-2014 Regents of the University of California. |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 4 | * |
| 5 | * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 6 | * |
Alexander Afanasyev | c169a81 | 2014-05-20 20:37:29 -0400 | [diff] [blame] | 7 | * ndn-cxx library is free software: you can redistribute it and/or modify it under the |
| 8 | * terms of the GNU Lesser General Public License as published by the Free Software |
| 9 | * Foundation, either version 3 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 13 | * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received copies of the GNU General Public License and GNU Lesser |
| 16 | * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see |
| 17 | * <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | * See AUTHORS.md for complete list of ndn-cxx authors and contributors. |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | #ifndef NDN_MANAGEMENT_NFD_FACE_STATUS_HPP |
| 23 | #define NDN_MANAGEMENT_NFD_FACE_STATUS_HPP |
| 24 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 25 | // This include must be kept as the first one, to ensure nfd-face-flags.hpp compiles on its own. |
| 26 | #include "nfd-face-flags.hpp" |
| 27 | |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 28 | #include "../encoding/tlv-nfd.hpp" |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 29 | #include "../encoding/encoding-buffer.hpp" |
Alexander Afanasyev | 258ec2b | 2014-05-14 16:15:37 -0700 | [diff] [blame] | 30 | #include "../encoding/block-helpers.hpp" |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 31 | #include "../util/time.hpp" |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 32 | |
| 33 | namespace ndn { |
| 34 | namespace nfd { |
| 35 | |
Alexander Afanasyev | 4671bf7 | 2014-05-19 09:01:37 -0400 | [diff] [blame] | 36 | /** |
| 37 | * \ingroup management |
| 38 | * \brief represents Face status |
| 39 | * \sa http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Face-Dataset |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 40 | */ |
| 41 | class FaceStatus : public FaceFlagsTraits<FaceStatus> |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 42 | { |
| 43 | public: |
| 44 | class Error : public Tlv::Error |
| 45 | { |
| 46 | public: |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 47 | explicit |
| 48 | Error(const std::string& what) |
| 49 | : Tlv::Error(what) |
| 50 | { |
| 51 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 52 | }; |
| 53 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 54 | FaceStatus(); |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 55 | |
| 56 | explicit |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 57 | FaceStatus(const Block& block) |
| 58 | { |
| 59 | this->wireDecode(block); |
| 60 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 61 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 62 | /** \brief prepend FaceStatus to the encoder |
| 63 | */ |
| 64 | template<bool T> |
| 65 | size_t |
| 66 | wireEncode(EncodingImpl<T>& encoder) const; |
| 67 | |
| 68 | /** \brief encode FaceStatus |
| 69 | */ |
| 70 | const Block& |
| 71 | wireEncode() const; |
| 72 | |
| 73 | /** \brief decode FaceStatus |
| 74 | */ |
| 75 | void |
| 76 | wireDecode(const Block& wire); |
| 77 | |
| 78 | public: // getters & setters |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 79 | uint64_t |
| 80 | getFaceId() const |
| 81 | { |
| 82 | return m_faceId; |
| 83 | } |
| 84 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 85 | FaceStatus& |
| 86 | setFaceId(uint64_t faceId) |
| 87 | { |
| 88 | m_wire.reset(); |
| 89 | m_faceId = faceId; |
| 90 | return *this; |
| 91 | } |
| 92 | |
| 93 | const std::string& |
| 94 | getRemoteUri() const |
| 95 | { |
| 96 | return m_remoteUri; |
| 97 | } |
| 98 | |
| 99 | FaceStatus& |
| 100 | setRemoteUri(const std::string& remoteUri) |
| 101 | { |
| 102 | m_wire.reset(); |
| 103 | m_remoteUri = remoteUri; |
| 104 | return *this; |
| 105 | } |
| 106 | |
| 107 | const std::string& |
| 108 | getLocalUri() const |
| 109 | { |
| 110 | return m_localUri; |
| 111 | } |
| 112 | |
| 113 | FaceStatus& |
| 114 | setLocalUri(const std::string& localUri) |
| 115 | { |
| 116 | m_wire.reset(); |
| 117 | m_localUri = localUri; |
| 118 | return *this; |
| 119 | } |
| 120 | |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 121 | bool |
| 122 | hasExpirationPeriod() const |
| 123 | { |
| 124 | return m_hasExpirationPeriod; |
| 125 | } |
| 126 | |
| 127 | const time::milliseconds& |
| 128 | getExpirationPeriod() const |
| 129 | { |
| 130 | BOOST_ASSERT(m_hasExpirationPeriod); |
| 131 | return m_expirationPeriod; |
| 132 | } |
| 133 | |
| 134 | FaceStatus& |
| 135 | setExpirationPeriod(const time::milliseconds& expirationPeriod) |
| 136 | { |
| 137 | m_expirationPeriod = expirationPeriod; |
| 138 | m_hasExpirationPeriod = true; |
| 139 | return *this; |
| 140 | } |
| 141 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 142 | uint64_t |
| 143 | getFlags() const |
| 144 | { |
| 145 | return m_flags; |
| 146 | } |
| 147 | |
| 148 | FaceStatus& |
| 149 | setFlags(uint64_t flags) |
| 150 | { |
| 151 | m_wire.reset(); |
| 152 | m_flags = flags; |
| 153 | return *this; |
| 154 | } |
| 155 | |
| 156 | uint64_t |
| 157 | getNInInterests() const |
| 158 | { |
| 159 | return m_nInInterests; |
| 160 | } |
| 161 | |
| 162 | FaceStatus& |
| 163 | setNInInterests(uint64_t nInInterests) |
| 164 | { |
| 165 | m_wire.reset(); |
| 166 | m_nInInterests = nInInterests; |
| 167 | return *this; |
| 168 | } |
| 169 | |
| 170 | uint64_t |
| 171 | getNInDatas() const |
| 172 | { |
| 173 | return m_nInDatas; |
| 174 | } |
| 175 | |
| 176 | FaceStatus& |
| 177 | setNInDatas(uint64_t nInDatas) |
| 178 | { |
| 179 | m_wire.reset(); |
| 180 | m_nInDatas = nInDatas; |
| 181 | return *this; |
| 182 | } |
| 183 | |
| 184 | uint64_t |
| 185 | getNOutInterests() const |
| 186 | { |
| 187 | return m_nOutInterests; |
| 188 | } |
| 189 | |
| 190 | FaceStatus& |
| 191 | setNOutInterests(uint64_t nOutInterests) |
| 192 | { |
| 193 | m_wire.reset(); |
| 194 | m_nOutInterests = nOutInterests; |
| 195 | return *this; |
| 196 | } |
| 197 | |
| 198 | uint64_t |
| 199 | getNOutDatas() const |
| 200 | { |
| 201 | return m_nOutDatas; |
| 202 | } |
| 203 | |
| 204 | FaceStatus& |
| 205 | setNOutDatas(uint64_t nOutDatas) |
| 206 | { |
| 207 | m_wire.reset(); |
| 208 | m_nOutDatas = nOutDatas; |
| 209 | return *this; |
| 210 | } |
| 211 | |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 212 | private: |
| 213 | uint64_t m_faceId; |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 214 | std::string m_remoteUri; |
| 215 | std::string m_localUri; |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 216 | time::milliseconds m_expirationPeriod; |
| 217 | bool m_hasExpirationPeriod; |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 218 | uint64_t m_flags; |
| 219 | uint64_t m_nInInterests; |
| 220 | uint64_t m_nInDatas; |
| 221 | uint64_t m_nOutInterests; |
| 222 | uint64_t m_nOutDatas; |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 223 | |
| 224 | mutable Block m_wire; |
| 225 | }; |
| 226 | |
| 227 | inline |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 228 | FaceStatus::FaceStatus() |
| 229 | : m_faceId(0) |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 230 | , m_hasExpirationPeriod(false) |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 231 | , m_flags(0) |
| 232 | , m_nInInterests(0) |
| 233 | , m_nInDatas(0) |
| 234 | , m_nOutInterests(0) |
| 235 | , m_nOutDatas(0) |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 236 | { |
| 237 | } |
| 238 | |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 239 | template<bool T> |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 240 | inline size_t |
| 241 | FaceStatus::wireEncode(EncodingImpl<T>& encoder) const |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 242 | { |
| 243 | size_t totalLength = 0; |
| 244 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 245 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 246 | tlv::nfd::NOutDatas, m_nOutDatas); |
| 247 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 248 | tlv::nfd::NOutInterests, m_nOutInterests); |
| 249 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 250 | tlv::nfd::NInDatas, m_nInDatas); |
| 251 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 252 | tlv::nfd::NInInterests, m_nInInterests); |
| 253 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 254 | tlv::nfd::FaceFlags, m_flags); |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 255 | if (m_hasExpirationPeriod) { |
| 256 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 257 | tlv::nfd::ExpirationPeriod, m_expirationPeriod.count()); |
| 258 | } |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 259 | totalLength += prependByteArrayBlock(encoder, tlv::nfd::LocalUri, |
| 260 | reinterpret_cast<const uint8_t*>(m_localUri.c_str()), m_localUri.size()); |
| 261 | totalLength += prependByteArrayBlock(encoder, tlv::nfd::Uri, |
| 262 | reinterpret_cast<const uint8_t*>(m_remoteUri.c_str()), m_remoteUri.size()); |
| 263 | totalLength += prependNonNegativeIntegerBlock(encoder, |
| 264 | tlv::nfd::FaceId, m_faceId); |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 265 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 266 | totalLength += encoder.prependVarNumber(totalLength); |
| 267 | totalLength += encoder.prependVarNumber(tlv::nfd::FaceStatus); |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 268 | return totalLength; |
| 269 | } |
| 270 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 271 | inline const Block& |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 272 | FaceStatus::wireEncode() const |
| 273 | { |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 274 | if (m_wire.hasWire()) |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 275 | return m_wire; |
| 276 | |
| 277 | EncodingEstimator estimator; |
| 278 | size_t estimatedSize = wireEncode(estimator); |
| 279 | |
| 280 | EncodingBuffer buffer(estimatedSize, 0); |
| 281 | wireEncode(buffer); |
| 282 | |
| 283 | m_wire = buffer.block(); |
| 284 | return m_wire; |
| 285 | } |
| 286 | |
| 287 | inline void |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 288 | FaceStatus::wireDecode(const Block& block) |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 289 | { |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 290 | if (block.type() != tlv::nfd::FaceStatus) { |
| 291 | throw Error("expecting FaceStatus block"); |
| 292 | } |
| 293 | m_wire = block; |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 294 | m_wire.parse(); |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 295 | Block::element_const_iterator val = m_wire.elements_begin(); |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 296 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 297 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceId) { |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 298 | m_faceId = readNonNegativeInteger(*val); |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 299 | ++val; |
| 300 | } |
| 301 | else { |
| 302 | throw Error("missing required FaceId field"); |
| 303 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 304 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 305 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) { |
| 306 | m_remoteUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size()); |
| 307 | ++val; |
| 308 | } |
| 309 | else { |
| 310 | throw Error("missing required Uri field"); |
| 311 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 312 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 313 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) { |
| 314 | m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size()); |
| 315 | ++val; |
| 316 | } |
| 317 | else { |
| 318 | throw Error("missing required LocalUri field"); |
| 319 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 320 | |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 321 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::ExpirationPeriod) { |
| 322 | m_expirationPeriod = time::milliseconds(readNonNegativeInteger(*val)); |
| 323 | m_hasExpirationPeriod = true; |
| 324 | ++val; |
| 325 | } |
| 326 | else { |
| 327 | m_hasExpirationPeriod = false; |
| 328 | // ExpirationPeriod is optional |
| 329 | } |
| 330 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 331 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceFlags) { |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 332 | m_flags = readNonNegativeInteger(*val); |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 333 | ++val; |
| 334 | } |
| 335 | else { |
| 336 | throw Error("missing required FaceFlags field"); |
| 337 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 338 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 339 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInInterests) { |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 340 | m_nInInterests = readNonNegativeInteger(*val); |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 341 | ++val; |
| 342 | } |
| 343 | else { |
| 344 | throw Error("missing required NInInterests field"); |
| 345 | } |
| 346 | |
| 347 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInDatas) { |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 348 | m_nInDatas = readNonNegativeInteger(*val); |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 349 | ++val; |
| 350 | } |
| 351 | else { |
| 352 | throw Error("missing required NInDatas field"); |
| 353 | } |
| 354 | |
| 355 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutInterests) { |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 356 | m_nOutInterests = readNonNegativeInteger(*val); |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 357 | ++val; |
| 358 | } |
| 359 | else { |
| 360 | throw Error("missing required NOutInterests field"); |
| 361 | } |
| 362 | |
| 363 | if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutDatas) { |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 364 | m_nOutDatas = readNonNegativeInteger(*val); |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 365 | ++val; |
| 366 | } |
| 367 | else { |
| 368 | throw Error("missing required NOutDatas field"); |
| 369 | } |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 370 | } |
| 371 | |
| 372 | inline std::ostream& |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 373 | operator<<(std::ostream& os, const FaceStatus& status) |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 374 | { |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 375 | os << "FaceStatus(" |
| 376 | << "FaceID: " << status.getFaceId() << ", " |
| 377 | << "RemoteUri: " << status.getRemoteUri() << ", " |
Alexander Afanasyev | e63eaf6 | 2014-06-30 12:40:55 -0700 | [diff] [blame^] | 378 | << "LocalUri: " << status.getLocalUri() << ", "; |
| 379 | |
| 380 | if (status.hasExpirationPeriod()) { |
| 381 | os << "ExpirationPeriod: " << status.getExpirationPeriod() << ", "; |
| 382 | } |
| 383 | else { |
| 384 | os << "ExpirationPeriod: infinite, "; |
| 385 | } |
| 386 | |
| 387 | os << "Flags: " << status.getFlags() << ", " |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 388 | << "Counters: " << status.getNInInterests() << "|" << status.getNInDatas() |
| 389 | << "|" << status.getNOutInterests() << "|" << status.getNOutDatas() |
| 390 | << ")"; |
Alexander Afanasyev | 04fa37a | 2014-03-19 18:06:22 -0700 | [diff] [blame] | 391 | return os; |
| 392 | } |
| 393 | |
| 394 | } // namespace nfd |
| 395 | } // namespace ndn |
| 396 | |
Junxiao Shi | 7b1ba1a | 2014-03-29 01:01:56 -0700 | [diff] [blame] | 397 | #endif // NDN_MANAGEMENT_NFD_FACE_STATUS_HPP |