blob: 37a5b7d8d254b3b95664f32a1b66530babc86502 [file] [log] [blame]
Shock Jiang6cce21a2014-09-07 10:14:12 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Yumin Xia55a7cc42017-05-14 18:43:34 -07002/*
3 * Copyright (c) 2014-2018, 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;
Yumin Xia55a7cc42017-05-14 18:43:34 -070038 case NDNS_DOE:
39 os << "DOE";
40 break;
Yumin Xiaa484ba72016-11-10 20:40:12 -080041 case NDNS_KEY:
42 os << "KEY";
Shock Jiang895bc1b2014-10-01 20:00:58 -070043 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070044 case NDNS_AUTH:
Shock Jiang895bc1b2014-10-01 20:00:58 -070045 os << "NDNS-Auth";
46 break;
Yumin Xiaa484ba72016-11-10 20:40:12 -080047 case NDNS_RESP:
48 os << "NDNS-Resp";
Shock Jiang895bc1b2014-10-01 20:00:58 -070049 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070050 default:
Shock Jiang895bc1b2014-10-01 20:00:58 -070051 os << "UNKNOWN";
52 break;
Shock Jiang6cce21a2014-09-07 10:14:12 -070053 }
Shock Jiang895bc1b2014-10-01 20:00:58 -070054 return os;
Shock Jiang6cce21a2014-09-07 10:14:12 -070055}
56
57} // namespace ndns
58} // namespace ndn