ndn-cxx: NDN C++ Library 0.9.0-33-g832ea91d
Loading...
Searching...
No Matches
fields.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_LP_FIELDS_HPP
23#define NDN_CXX_LP_FIELDS_HPP
24
27#include "ndn-cxx/lp/field.hpp"
32#include "ndn-cxx/lp/tlv.hpp"
33
34#include <boost/mp11/list.hpp>
35#include <boost/mp11/set.hpp>
36
37namespace ndn::lp {
38
45typedef FieldDecl<field_location_tags::Fragment,
46 std::pair<Buffer::const_iterator, Buffer::const_iterator>,
48
52
54 uint64_t,
56 false,
57 NonNegativeIntegerTag,
58 NonNegativeIntegerTag> FragIndexField;
59
61 uint64_t,
63 false,
64 NonNegativeIntegerTag,
65 NonNegativeIntegerTag> FragCountField;
66
68 std::pair<Buffer::const_iterator, Buffer::const_iterator>,
70
74
76 uint64_t,
78 false,
79 NonNegativeIntegerTag,
80 NonNegativeIntegerTag> IncomingFaceIdField;
81
83 uint64_t,
85 false,
86 NonNegativeIntegerTag,
87 NonNegativeIntegerTag> NextHopFaceIdField;
88
92
94 uint64_t,
96 false,
97 NonNegativeIntegerTag,
98 NonNegativeIntegerTag> CongestionMarkField;
99
101 Sequence,
102 tlv::Ack,
103 true> AckField;
104
106 Sequence,
108
112
116
120using FieldSet = boost::mp11::mp_list<
126 NackField,
131 AckField,
135>;
136static_assert(boost::mp11::mp_is_set<FieldSet>());
137
138} // namespace ndn::lp
139
140#endif // NDN_CXX_LP_FIELDS_HPP
Represents a CachePolicy header field.
Declare a field.
Represents a Network Nack header.
Represents a PrefixAnnouncement header field in NDNLP.
@ CachePolicy
Definition tlv.hpp:47
@ IncomingFaceId
Definition tlv.hpp:45
@ NonDiscovery
Definition tlv.hpp:52
@ TxSequence
Definition tlv.hpp:51
@ CongestionMark
Definition tlv.hpp:49
@ NextHopFaceId
Definition tlv.hpp:46
@ PrefixAnnouncement
Definition tlv.hpp:53
@ FragIndex
Definition tlv.hpp:40
@ FragCount
Definition tlv.hpp:41
Contains classes and functions related to NDNLPv2.
FieldDecl< field_location_tags::Header, uint64_t, tlv::NextHopFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > NextHopFaceIdField
Definition fields.hpp:87
FieldDecl< field_location_tags::Header, uint64_t, tlv::FragCount, false, NonNegativeIntegerTag, NonNegativeIntegerTag > FragCountField
Definition fields.hpp:65
FieldDecl< field_location_tags::Header, Sequence, tlv::TxSequence > TxSequenceField
Definition fields.hpp:107
FieldDecl< field_location_tags::Header, EmptyValue, tlv::NonDiscovery > NonDiscoveryField
Definition fields.hpp:111
FieldDecl< field_location_tags::Fragment, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::Fragment > FragmentField
Declare the Fragment field.
Definition fields.hpp:47
FieldDecl< field_location_tags::Header, Sequence, tlv::Sequence > SequenceField
Definition fields.hpp:51
FieldDecl< field_location_tags::Header, uint64_t, tlv::FragIndex, false, NonNegativeIntegerTag, NonNegativeIntegerTag > FragIndexField
Definition fields.hpp:58
uint64_t Sequence
Represents a sequence number.
Definition sequence.hpp:34
FieldDecl< field_location_tags::Header, PrefixAnnouncementHeader, tlv::PrefixAnnouncement > PrefixAnnouncementField
Definition fields.hpp:115
FieldDecl< field_location_tags::Header, uint64_t, tlv::IncomingFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > IncomingFaceIdField
Definition fields.hpp:80
FieldDecl< field_location_tags::Header, NackHeader, tlv::Nack > NackField
Definition fields.hpp:73
boost::mp11::mp_list< FragmentField, SequenceField, FragIndexField, FragCountField, PitTokenField, NackField, NextHopFaceIdField, IncomingFaceIdField, CachePolicyField, CongestionMarkField, AckField, TxSequenceField, NonDiscoveryField, PrefixAnnouncementField > FieldSet
Set of all field declarations.
Definition fields.hpp:135
FieldDecl< field_location_tags::Header, Sequence, tlv::Ack, true > AckField
Definition fields.hpp:103
FieldDecl< field_location_tags::Header, CachePolicy, tlv::CachePolicy > CachePolicyField
Definition fields.hpp:91
FieldDecl< field_location_tags::Header, uint64_t, tlv::CongestionMark, false, NonNegativeIntegerTag, NonNegativeIntegerTag > CongestionMarkField
Definition fields.hpp:98
FieldDecl< field_location_tags::Header, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::PitToken > PitTokenField
Definition fields.hpp:69
Represents a zero-length TLV-VALUE.