blob: 383eb95fb1571e89093d6de11884824bdc3469b3 [file] [log] [blame]
Shock Jiang6cce21a2014-09-07 10:14:12 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Yumin Xiaa484ba72016-11-10 20:40:12 -08003 * Copyright (c) 2014-2016, Regents of the University of California.
Shock Jiang6cce21a2014-09-07 10:14:12 -07004 *
5 * This file is part of NDNS (Named Data Networking Domain Name Service).
6 * See AUTHORS.md for complete list of NDNS authors and contributors.
7 *
8 * NDNS 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 * NDNS 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 * NDNS, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include "ndns-enum.hpp"
21
22namespace ndn {
23namespace ndns {
24
Shock Jiang895bc1b2014-10-01 20:00:58 -070025std::ostream&
Yumin Xiaa484ba72016-11-10 20:40:12 -080026operator<<(std::ostream& os, const NdnsContentType ndnsType)
Shock Jiang6cce21a2014-09-07 10:14:12 -070027{
28 switch (ndnsType) {
Yumin Xiaa484ba72016-11-10 20:40:12 -080029 case NDNS_BLOB:
30 os << "BLOB";
31 break;
32 case NDNS_LINK:
33 os << "LINK";
Shock Jiang895bc1b2014-10-01 20:00:58 -070034 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070035 case NDNS_NACK:
Yumin Xiaa484ba72016-11-10 20:40:12 -080036 os << "NACK";
37 break;
38 case NDNS_KEY:
39 os << "KEY";
Shock Jiang895bc1b2014-10-01 20:00:58 -070040 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070041 case NDNS_AUTH:
Shock Jiang895bc1b2014-10-01 20:00:58 -070042 os << "NDNS-Auth";
43 break;
Yumin Xiaa484ba72016-11-10 20:40:12 -080044 case NDNS_RESP:
45 os << "NDNS-Resp";
Shock Jiang895bc1b2014-10-01 20:00:58 -070046 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070047 default:
Shock Jiang895bc1b2014-10-01 20:00:58 -070048 os << "UNKNOWN";
49 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070050 }
Shock Jiang895bc1b2014-10-01 20:00:58 -070051 return os;
Shock Jiang6cce21a2014-09-07 10:14:12 -070052}
53
54} // namespace ndns
55} // namespace ndn