NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd-constants.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #include "nfd-constants.hpp"
23 #include <iostream>
24 
25 namespace ndn {
26 namespace nfd {
27 
28 std::ostream&
29 operator<<(std::ostream& os, FaceScope faceScope)
30 {
31  switch (faceScope) {
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 
45 std::ostream&
46 operator<<(std::ostream& os, FacePersistency facePersistency)
47 {
48  switch (facePersistency) {
50  os << "persistent";
51  break;
53  os << "on-demand";
54  break;
56  os << "permanent";
57  break;
58  default:
59  os << "unknown";
60  break;
61  }
62  return os;
63 }
64 
65 std::ostream&
66 operator<<(std::ostream& os, LinkType linkType)
67 {
68  switch (linkType) {
70  os << "point-to-point";
71  break;
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
Copyright (c) 2011-2015 Regents of the University of California.
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:38
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)