blob: dba7e85f55112bf01516cb3174c2577bb2efa2f4 [file] [log] [blame]
Eric Newberrya98bf932015-09-21 00:58:47 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Eric Newberry41aba102017-11-01 16:42:13 -07002/*
Davide Pesavento91c15c82024-01-15 17:14:23 -05003 * Copyright (c) 2014-2024, Regents of the University of California,
Eric Newberrya98bf932015-09-21 00:58:47 -07004 * Arizona Board of Regents,
5 * Colorado State University,
6 * University Pierre & Marie Curie, Sorbonne University,
7 * Washington University in St. Louis,
8 * Beijing Institute of Technology,
9 * The University of Memphis.
10 *
11 * This file is part of NFD (Named Data Networking Forwarding Daemon).
12 * See AUTHORS.md for complete list of NFD authors and contributors.
13 *
14 * NFD is free software: you can redistribute it and/or modify it under the terms
15 * of the GNU General Public License as published by the Free Software Foundation,
16 * either version 3 of the License, or (at your option) any later version.
17 *
18 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
19 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20 * PURPOSE. See the GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License along with
23 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26#ifndef NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP
27#define NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP
28
Eric Newberrya98bf932015-09-21 00:58:47 -070029#include "link-service.hpp"
Eric Newberry4c3e6b82015-11-10 16:48:42 -070030#include "lp-fragmenter.hpp"
31#include "lp-reassembler.hpp"
Eric Newberry185ab292017-03-28 06:45:39 +000032#include "lp-reliability.hpp"
Eric Newberrya98bf932015-09-21 00:58:47 -070033
Davide Pesavento2c9d2ca2024-01-27 16:36:51 -050034#include <limits>
35
Davide Pesaventoe422f9e2022-06-03 01:30:23 -040036namespace nfd::face {
Eric Newberrya98bf932015-09-21 00:58:47 -070037
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040038/** \brief Counters provided by GenericLinkService.
39 * \note The type name GenericLinkServiceCounters is an implementation detail.
40 * Use GenericLinkService::Counters in public API.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070041 */
42class GenericLinkServiceCounters : public virtual LinkService::Counters
43{
44public:
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040045 /** \brief Count of failed fragmentations.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070046 */
47 PacketCounter nFragmentationErrors;
48
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040049 /** \brief Count of outgoing LpPackets dropped due to exceeding MTU limit.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070050 *
51 * If this counter is non-zero, the operator should enable fragmentation.
52 */
53 PacketCounter nOutOverMtu;
54
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040055 /** \brief Count of invalid LpPackets dropped before reassembly.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070056 */
57 PacketCounter nInLpInvalid;
58
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040059 /** \brief Count of network-layer packets currently being reassembled.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070060 */
61 SizeCounter<LpReassembler> nReassembling;
62
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040063 /** \brief Count of dropped partial network-layer packets due to reassembly timeout.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070064 */
65 PacketCounter nReassemblyTimeouts;
66
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040067 /** \brief Count of invalid reassembled network-layer packets dropped.
Eric Newberry4c3e6b82015-11-10 16:48:42 -070068 */
69 PacketCounter nInNetInvalid;
Eric Newberry185ab292017-03-28 06:45:39 +000070
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040071 /** \brief Count of network-layer packets that did not require retransmission of a fragment.
Eric Newberry185ab292017-03-28 06:45:39 +000072 */
73 PacketCounter nAcknowledged;
74
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040075 /** \brief Count of network-layer packets that had at least one fragment retransmitted, but were
76 * eventually received in full.
Eric Newberry185ab292017-03-28 06:45:39 +000077 */
78 PacketCounter nRetransmitted;
79
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040080 /** \brief Count of network-layer packets dropped because a fragment reached the maximum number
81 * of retransmissions.
Eric Newberry185ab292017-03-28 06:45:39 +000082 */
83 PacketCounter nRetxExhausted;
Eric Newberryb49313d2017-12-24 20:22:27 -070084
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040085 /** \brief Count of LpPackets dropped due to duplicate Sequence numbers.
Eric Newberry32f7eac2020-02-07 14:40:17 -080086 */
87 PacketCounter nDuplicateSequence;
88
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040089 /** \brief Count of outgoing LpPackets that were marked with congestion marks.
Eric Newberryb49313d2017-12-24 20:22:27 -070090 */
91 PacketCounter nCongestionMarked;
Eric Newberry4c3e6b82015-11-10 16:48:42 -070092};
93
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -040094/**
95 * \brief GenericLinkService is a LinkService that implements the NDNLPv2 protocol.
96 * \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
Eric Newberrya98bf932015-09-21 00:58:47 -070097 */
Davide Pesavento264af772021-02-09 21:48:24 -050098class GenericLinkService NFD_FINAL_UNLESS_WITH_TESTS : public LinkService
99 , protected virtual GenericLinkServiceCounters
Eric Newberrya98bf932015-09-21 00:58:47 -0700100{
Eric Newberry86d31872015-09-23 16:24:59 -0700101public:
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400102 /** \brief %Options that control the behavior of GenericLinkService.
Eric Newberry86d31872015-09-23 16:24:59 -0700103 */
104 class Options
105 {
106 public:
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400107 Options() noexcept
108 {
109 }
Eric Newberry86d31872015-09-23 16:24:59 -0700110
111 public:
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400112 /** \brief Enables encoding of IncomingFaceId, and decoding of NextHopFaceId and CachePolicy.
Eric Newberry86d31872015-09-23 16:24:59 -0700113 */
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400114 bool allowLocalFields = false;
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700115
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400116 /** \brief Enables fragmentation.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700117 */
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400118 bool allowFragmentation = false;
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700119
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400120 /** \brief Options for fragmentation.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700121 */
122 LpFragmenter::Options fragmenterOptions;
123
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400124 /** \brief Enables reassembly.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700125 */
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400126 bool allowReassembly = false;
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700127
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400128 /** \brief Options for reassembly.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700129 */
130 LpReassembler::Options reassemblerOptions;
Eric Newberry185ab292017-03-28 06:45:39 +0000131
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400132 /** \brief Options for reliability.
Eric Newberry185ab292017-03-28 06:45:39 +0000133 */
134 LpReliability::Options reliabilityOptions;
Eric Newberryb49313d2017-12-24 20:22:27 -0700135
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400136 /** \brief Enables send queue congestion detection and marking.
Eric Newberryb49313d2017-12-24 20:22:27 -0700137 */
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400138 bool allowCongestionMarking = false;
Eric Newberryb49313d2017-12-24 20:22:27 -0700139
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400140 /** \brief Starting value for congestion marking interval.
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400141 *
Klaus Schneider380668b2019-10-02 01:21:13 -0700142 * Packets are marked if the queue size stays above THRESHOLD for at least one INTERVAL.
143 *
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400144 * The default value (100 ms) is taken from RFC 8289 (CoDel).
Eric Newberryb49313d2017-12-24 20:22:27 -0700145 */
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400146 time::nanoseconds baseCongestionMarkingInterval = 100_ms;
Eric Newberryb49313d2017-12-24 20:22:27 -0700147
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400148 /** \brief Default congestion threshold in bytes.
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400149 *
Klaus Schneider380668b2019-10-02 01:21:13 -0700150 * Packets are marked if the queue size stays above THRESHOLD for at least one INTERVAL.
151 *
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400152 * The default value (64 KiB) works well for a queue capacity of 200 KiB.
Eric Newberryb49313d2017-12-24 20:22:27 -0700153 */
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400154 size_t defaultCongestionThreshold = 65536;
Teng Liangfdcbb4d2018-01-27 16:01:35 -0700155
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400156 /** \brief Enables self-learning forwarding support.
Teng Liangfdcbb4d2018-01-27 16:01:35 -0700157 */
Teng Liang39465c22018-11-12 19:43:04 -0700158 bool allowSelfLearning = true;
Eric Newberrycb6551e2020-03-02 14:12:16 -0800159
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400160 /** \brief Overrides the MTU provided by Transport.
Eric Newberrycb6551e2020-03-02 14:12:16 -0800161 *
162 * This MTU value will be used instead of the MTU provided by the transport if it is less than
163 * the transport MTU. However, it will not be utilized when the transport MTU is unlimited.
164 *
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400165 * Acceptable values for this option are values >= #MIN_MTU, which can be validated before
Eric Newberrycb6551e2020-03-02 14:12:16 -0800166 * being set with canOverrideMtuTo().
167 */
168 ssize_t overrideMtu = std::numeric_limits<ssize_t>::max();
Eric Newberry86d31872015-09-23 16:24:59 -0700169 };
170
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400171 /** \brief %Counters provided by GenericLinkService.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700172 */
Junxiao Shifab9e0d2017-02-02 06:04:59 +0000173 using Counters = GenericLinkServiceCounters;
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700174
Eric Newberry86d31872015-09-23 16:24:59 -0700175 explicit
Davide Pesaventoe4b22382018-06-10 14:37:24 -0400176 GenericLinkService(const Options& options = {});
Eric Newberry86d31872015-09-23 16:24:59 -0700177
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400178 /** \brief Get the options used by GenericLinkService.
Eric Newberry86d31872015-09-23 16:24:59 -0700179 */
180 const Options&
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400181 getOptions() const
182 {
183 return m_options;
184 }
Eric Newberry86d31872015-09-23 16:24:59 -0700185
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400186 /** \brief Sets the options used by GenericLinkService.
Eric Newberry86d31872015-09-23 16:24:59 -0700187 */
188 void
189 setOptions(const Options& options);
190
Junxiao Shifab9e0d2017-02-02 06:04:59 +0000191 const Counters&
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400192 getCounters() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL
193 {
194 return *this;
195 }
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700196
Eric Newberrycb6551e2020-03-02 14:12:16 -0800197 ssize_t
Davide Pesavento264af772021-02-09 21:48:24 -0500198 getEffectiveMtu() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
Eric Newberrycb6551e2020-03-02 14:12:16 -0800199
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400200 /** \brief Whether MTU can be overridden to the specified value.
Eric Newberrycb6551e2020-03-02 14:12:16 -0800201 *
202 * If the transport MTU is unlimited, then this will always return false.
203 */
204 bool
205 canOverrideMtuTo(ssize_t mtu) const;
206
Davide Pesavento264af772021-02-09 21:48:24 -0500207NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE: // send path
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400208 /** \brief Request an IDLE packet to transmit pending service fields.
Eric Newberry185ab292017-03-28 06:45:39 +0000209 */
210 void
Teng Liangf3bc3ae2020-06-08 10:19:25 -0700211 requestIdlePacket();
Eric Newberry185ab292017-03-28 06:45:39 +0000212
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400213 /** \brief Send an LpPacket.
Eric Newberry185ab292017-03-28 06:45:39 +0000214 */
215 void
Teng Liangf3bc3ae2020-06-08 10:19:25 -0700216 sendLpPacket(lp::Packet&& pkt);
Eric Newberry185ab292017-03-28 06:45:39 +0000217
Eric Newberrya98bf932015-09-21 00:58:47 -0700218 void
Davide Pesavento264af772021-02-09 21:48:24 -0500219 doSendInterest(const Interest& interest) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
Eric Newberrya98bf932015-09-21 00:58:47 -0700220
Eric Newberrya98bf932015-09-21 00:58:47 -0700221 void
Davide Pesavento264af772021-02-09 21:48:24 -0500222 doSendData(const Data& data) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
Eric Newberrya98bf932015-09-21 00:58:47 -0700223
Eric Newberrya98bf932015-09-21 00:58:47 -0700224 void
Davide Pesavento264af772021-02-09 21:48:24 -0500225 doSendNack(const ndn::lp::Nack& nack) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
Eric Newberrya98bf932015-09-21 00:58:47 -0700226
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400227 /** \brief Assign consecutive sequence numbers to LpPackets.
Eric Newberry32f7eac2020-02-07 14:40:17 -0800228 */
229 void
230 assignSequences(std::vector<lp::Packet>& pkts);
231
Eric Newberry185ab292017-03-28 06:45:39 +0000232private: // send path
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400233 /** \brief Encode link protocol fields from tags onto an outgoing LpPacket.
Eric Newberryee400b52016-11-24 14:12:48 +0000234 * \param netPkt network-layer packet to extract tags from
235 * \param lpPacket LpPacket to add link protocol fields to
Eric Newberry86d31872015-09-23 16:24:59 -0700236 */
Eric Newberryee400b52016-11-24 14:12:48 +0000237 void
Eric Newberry41aba102017-11-01 16:42:13 -0700238 encodeLpFields(const ndn::PacketBase& netPkt, lp::Packet& lpPacket);
Eric Newberry86d31872015-09-23 16:24:59 -0700239
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400240 /** \brief Send a complete network layer packet.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700241 * \param pkt LpPacket containing a complete network layer packet
Eric Newberry41aba102017-11-01 16:42:13 -0700242 * \param isInterest whether the network layer packet is an Interest
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700243 */
244 void
Teng Liangf3bc3ae2020-06-08 10:19:25 -0700245 sendNetPacket(lp::Packet&& pkt, bool isInterest);
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700246
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400247 /** \brief If the send queue is found to be congested, add a congestion mark to the packet
248 * according to CoDel.
Eric Newberryb49313d2017-12-24 20:22:27 -0700249 * \sa https://tools.ietf.org/html/rfc8289
250 */
251 void
252 checkCongestionLevel(lp::Packet& pkt);
253
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700254private: // receive path
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700255 void
Davide Pesavento264af772021-02-09 21:48:24 -0500256 doReceivePacket(const Block& packet, const EndpointId& endpoint) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700257
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400258 /** \brief Decode incoming network-layer packet.
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700259 * \param netPkt reassembled network-layer packet
260 * \param firstPkt LpPacket of first fragment
ashiqopu075bb7d2019-03-10 01:38:21 +0000261 * \param endpointId endpoint of peer who sent the packet
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700262 *
263 * If decoding is successful, a receive signal is emitted;
264 * otherwise, a warning is logged.
265 */
266 void
ashiqopu075bb7d2019-03-10 01:38:21 +0000267 decodeNetPacket(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700268
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400269 /** \brief Decode incoming Interest.
Eric Newberry86d31872015-09-23 16:24:59 -0700270 * \param netPkt reassembled network-layer packet; TLV-TYPE must be Interest
271 * \param firstPkt LpPacket of first fragment; must not have Nack field
ashiqopu075bb7d2019-03-10 01:38:21 +0000272 * \param endpointId endpoint of peer who sent the Interest
Eric Newberry86d31872015-09-23 16:24:59 -0700273 *
274 * If decoding is successful, receiveInterest signal is emitted;
275 * otherwise, a warning is logged.
276 *
277 * \throw tlv::Error parse error in an LpHeader field
278 */
279 void
ashiqopu075bb7d2019-03-10 01:38:21 +0000280 decodeInterest(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
Eric Newberry86d31872015-09-23 16:24:59 -0700281
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400282 /** \brief Decode incoming Interest.
Eric Newberry86d31872015-09-23 16:24:59 -0700283 * \param netPkt reassembled network-layer packet; TLV-TYPE must be Data
284 * \param firstPkt LpPacket of first fragment
ashiqopu075bb7d2019-03-10 01:38:21 +0000285 * \param endpointId endpoint of peer who sent the Data
Eric Newberry86d31872015-09-23 16:24:59 -0700286 *
287 * If decoding is successful, receiveData signal is emitted;
288 * otherwise, a warning is logged.
289 *
290 * \throw tlv::Error parse error in an LpHeader field
291 */
292 void
ashiqopu075bb7d2019-03-10 01:38:21 +0000293 decodeData(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
Eric Newberry86d31872015-09-23 16:24:59 -0700294
Davide Pesaventoaa9e3b22022-10-21 17:00:07 -0400295 /** \brief Decode incoming Interest.
Eric Newberry86d31872015-09-23 16:24:59 -0700296 * \param netPkt reassembled network-layer packet; TLV-TYPE must be Interest
297 * \param firstPkt LpPacket of first fragment; must have Nack field
ashiqopu075bb7d2019-03-10 01:38:21 +0000298 * \param endpointId endpoint of peer who sent the Nack
Eric Newberry86d31872015-09-23 16:24:59 -0700299 *
300 * If decoding is successful, receiveNack signal is emitted;
301 * otherwise, a warning is logged.
302 *
303 * \throw tlv::Error parse error in an LpHeader field
304 */
305 void
ashiqopu075bb7d2019-03-10 01:38:21 +0000306 decodeNack(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
Eric Newberry86d31872015-09-23 16:24:59 -0700307
Davide Pesavento264af772021-02-09 21:48:24 -0500308NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
Eric Newberry86d31872015-09-23 16:24:59 -0700309 Options m_options;
Eric Newberry4c3e6b82015-11-10 16:48:42 -0700310 LpFragmenter m_fragmenter;
311 LpReassembler m_reassembler;
Eric Newberry185ab292017-03-28 06:45:39 +0000312 LpReliability m_reliability;
Davide Pesavento91c15c82024-01-15 17:14:23 -0500313 lp::Sequence m_lastSeqNo = static_cast<lp::Sequence>(-2);
Eric Newberry185ab292017-03-28 06:45:39 +0000314
Davide Pesavento264af772021-02-09 21:48:24 -0500315NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
Eric Newberryb49313d2017-12-24 20:22:27 -0700316 /// Time to mark next packet due to send queue congestion
Davide Pesavento91c15c82024-01-15 17:14:23 -0500317 time::steady_clock::time_point m_nextMarkTime = time::steady_clock::time_point::max();
318 /// Number of marked packets in the current incident of congestion
319 size_t m_nMarkedSinceInMarkingState = 0;
Eric Newberryb49313d2017-12-24 20:22:27 -0700320
Davide Pesaventoa3a7a4e2022-05-29 16:06:22 -0400321 friend LpReliability;
Eric Newberrya98bf932015-09-21 00:58:47 -0700322};
323
Davide Pesaventoe422f9e2022-06-03 01:30:23 -0400324} // namespace nfd::face
Eric Newberrya98bf932015-09-21 00:58:47 -0700325
Eric Newberry86d31872015-09-23 16:24:59 -0700326#endif // NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP