blob: 5556046b1e3152137ff46c12fe160529978f56a9 [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
22#include "nfd-face-traits.hpp"
23
24namespace ndn {
25namespace nfd {
26
27std::ostream&
28operator<<(std::ostream& os, FaceScope faceScope)
29{
30 switch (faceScope) {
31 case FACE_SCOPE_NON_LOCAL:
32 os << "non-local";
33 break;
34 case FACE_SCOPE_LOCAL:
35 os << "local";
36 break;
37 default:
38 os << "unknown";
39 break;
40 }
41 return os;
42}
43
44std::ostream&
45operator<<(std::ostream& os, FacePersistency facePersistency)
46{
47 switch (facePersistency) {
48 case FACE_PERSISTENCY_PERSISTENT:
49 os << "persistent";
50 break;
51 case FACE_PERSISTENCY_ON_DEMAND:
52 os << "on-demand";
53 break;
54 case FACE_PERSISTENCY_PERMANENT:
55 os << "permanent";
56 break;
57 default:
58 os << "unknown";
59 break;
60 }
61 return os;
62}
63
64std::ostream&
65operator<<(std::ostream& os, LinkType linkType)
66{
67 switch (linkType) {
68 case LINK_TYPE_POINT_TO_POINT:
69 os << "point-to-point";
70 break;
71 case LINK_TYPE_MULTI_ACCESS:
72 os << "multi-access";
73 break;
74 default:
75 os << "unknown";
76 break;
77 }
78 return os;
79}
80
81} // namespace nfd
82} // namespace ndn