blob: 8723bd7fc4f8b587a2b73319c96cb0574abf7d65 [file] [log] [blame]
Chengyu Fan36dca992014-09-25 13:42:03 -06001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2013-2014 Regents of the University of California.
4 *
5 * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6 *
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.
20 */
21
Junxiao Shi65f1a712014-11-20 14:59:36 -070022#include "nfd-constants.hpp"
23#include <iostream>
Chengyu Fan36dca992014-09-25 13:42:03 -060024
25namespace ndn {
26namespace nfd {
27
28std::ostream&
29operator<<(std::ostream& os, FaceScope faceScope)
30{
31 switch (faceScope) {
32 case FACE_SCOPE_NON_LOCAL:
33 os << "non-local";
34 break;
35 case FACE_SCOPE_LOCAL:
36 os << "local";
37 break;
38 default:
39 os << "unknown";
40 break;
41 }
42 return os;
43}
44
45std::ostream&
46operator<<(std::ostream& os, FacePersistency facePersistency)
47{
48 switch (facePersistency) {
49 case FACE_PERSISTENCY_PERSISTENT:
50 os << "persistent";
51 break;
52 case FACE_PERSISTENCY_ON_DEMAND:
53 os << "on-demand";
54 break;
55 case FACE_PERSISTENCY_PERMANENT:
56 os << "permanent";
57 break;
58 default:
59 os << "unknown";
60 break;
61 }
62 return os;
63}
64
65std::ostream&
66operator<<(std::ostream& os, LinkType linkType)
67{
68 switch (linkType) {
69 case LINK_TYPE_POINT_TO_POINT:
70 os << "point-to-point";
71 break;
72 case LINK_TYPE_MULTI_ACCESS:
73 os << "multi-access";
74 break;
75 default:
76 os << "unknown";
77 break;
78 }
79 return os;
80}
81
82} // namespace nfd
83} // namespace ndn