nfd-constants.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013-2023 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 #ifndef NDN_CXX_ENCODING_NFD_CONSTANTS_HPP
23 #define NDN_CXX_ENCODING_NFD_CONSTANTS_HPP
24 
25 #include <cstdint>
26 #include <iosfwd>
27 #include <limits>
28 
29 namespace ndn::nfd {
30 
31 inline constexpr uint64_t INVALID_FACE_ID = 0;
32 
35 enum FaceScope : uint8_t {
36  FACE_SCOPE_NONE = std::numeric_limits<uint8_t>::max(),
39 };
40 
41 std::ostream&
42 operator<<(std::ostream& os, FaceScope faceScope);
43 
46 enum FacePersistency : uint8_t {
47  FACE_PERSISTENCY_NONE = std::numeric_limits<uint8_t>::max(),
51 };
52 
53 std::ostream&
54 operator<<(std::ostream& os, FacePersistency facePersistency);
55 
58 enum LinkType : uint8_t {
59  LINK_TYPE_NONE = std::numeric_limits<uint8_t>::max(),
63 };
64 
65 std::ostream&
66 operator<<(std::ostream& os, LinkType linkType);
67 
74 };
75 
78 enum FaceEventKind : uint8_t {
84 };
85 
86 std::ostream&
87 operator<<(std::ostream& os, FaceEventKind faceEventKind);
88 
93 enum CsFlagBit {
96 };
97 
100 enum RouteOrigin : uint16_t {
101  ROUTE_ORIGIN_NONE = std::numeric_limits<uint16_t>::max(),
109 };
110 
116 std::istream&
117 operator>>(std::istream& is, RouteOrigin& routeOrigin);
118 
119 std::ostream&
120 operator<<(std::ostream& os, RouteOrigin routeOrigin);
121 
124 enum RouteFlags : uint64_t {
128 };
129 
130 std::ostream&
131 operator<<(std::ostream& os, RouteFlags routeFlags);
132 
133 } // namespace ndn::nfd
134 
135 #endif // NDN_CXX_ENCODING_NFD_CONSTANTS_HPP
CsFlagBit
CS enablement flags.
@ FACE_PERSISTENCY_NONE
@ FACE_PERSISTENCY_ON_DEMAND
face is on-demand
@ FACE_PERSISTENCY_PERSISTENT
face is persistent
@ FACE_PERSISTENCY_PERMANENT
face is permanent
@ ROUTE_ORIGIN_PREFIXANN
@ ROUTE_ORIGIN_AUTOREG
@ ROUTE_ORIGIN_AUTOCONF
@ FACE_SCOPE_LOCAL
face is local
@ FACE_SCOPE_NON_LOCAL
face is non-local
@ BIT_LOCAL_FIELDS_ENABLED
whether local fields are enabled on a face
@ BIT_CONGESTION_MARKING_ENABLED
whether congestion detection and marking is enabled on a face
@ BIT_LP_RELIABILITY_ENABLED
whether the link reliability feature is enabled on a face
@ ROUTE_FLAG_CHILD_INHERIT
@ LINK_TYPE_AD_HOC
link is ad hoc
@ LINK_TYPE_MULTI_ACCESS
link is multi-access
@ LINK_TYPE_POINT_TO_POINT
link is point-to-point
@ FACE_EVENT_DOWN
face went DOWN (from UP state)
@ FACE_EVENT_CREATED
face was created
@ FACE_EVENT_UP
face went UP (from DOWN state)
@ FACE_EVENT_DESTROYED
face was destroyed
@ BIT_CS_ENABLE_ADMIT
enables the CS to admit new Data
@ BIT_CS_ENABLE_SERVE
enables the CS to satisfy Interests using cached Data
Contains classes and functions related to the NFD Management protocol.
constexpr uint64_t INVALID_FACE_ID
std::istream & operator>>(std::istream &is, RouteOrigin &routeOrigin)
Extract RouteOrigin from stream.
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)