Refactor and modernize namespace declarations
* Completely remove inline namespace v2 * Flatten some unnecessarily deep namespace nesting * Move DummyClientFace, Segmenter, SegmentFetcher to namespace ndn * Move all unit tests to namespace ndn::tests Change-Id: I8bcfcf9fd669936a3277d2d5d505f765b4b05742
This commit is contained in:
1 parent
21b7f1b379
commit
47ce2eed3a
494 files changed
+2003
-3685
No files matched your search
+7
-9
@@ -3,11 +3,11 @@ ndn-cxx Code Style and Coding Guidelines
|
||||
|
||||
Based on
|
||||
|
||||
* "C++ Programming Style Guidelines" by Geotechnical Software Services, Copyright © 1996 – 2011.
|
||||
The original document is available at `<http://geosoft.no/development/cppstyle.html>`_
|
||||
* "C++ Programming Style Guidelines" by Geotechnical Software Services, Copyright © 1996-2011.
|
||||
The original document is available at `<http://geosoft.no/development/cppstyle.html>`__
|
||||
|
||||
* NDN Platform "C++, C, C#, Java and JavaScript Code Guidelines".
|
||||
The original document is available at `<https://named-data.net/codebase/platform/documentation/ndn-platform-development-guidelines/cpp-code-guidelines/>`_
|
||||
The original document is available at `<https://named-data.net/codebase/platform/documentation/ndn-platform-development-guidelines/cpp-code-guidelines/>`__
|
||||
|
||||
1. Code layout
|
||||
--------------
|
||||
@@ -52,11 +52,11 @@ extended it to C++.
|
||||
|
||||
} // namespace example
|
||||
|
||||
Note that code inside namespace is **not** indented. Avoid the following:
|
||||
Note that code inside the namespace is **not** indented. Avoid the following:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
// NOT
|
||||
// WRONG
|
||||
//
|
||||
// namespace example {
|
||||
//
|
||||
@@ -479,13 +479,11 @@ written in mixed case starting with lower case.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
namespace model {
|
||||
namespace analyzer {
|
||||
namespace model::analyzer {
|
||||
|
||||
...
|
||||
|
||||
} // namespace analyzer
|
||||
} // namespace model
|
||||
} // namespace model::analyzer
|
||||
|
||||
2.7. Names representing generic template types should be a single uppercase letter.
|
||||
|
||||
|
||||
@@ -1739,16 +1739,6 @@ LATEX_BATCHMODE = NO
|
||||
|
||||
LATEX_HIDE_INDICES = NO
|
||||
|
||||
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
|
||||
# code with syntax highlighting in the LaTeX output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
@@ -1821,16 +1811,6 @@ RTF_STYLESHEET_FILE =
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
|
||||
# with syntax highlighting in the RTF output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_SOURCE_CODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1920,15 +1900,6 @@ GENERATE_DOCBOOK = NO
|
||||
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
|
||||
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
|
||||
# program listings (including syntax highlighting and cross-referencing
|
||||
# information) to the DOCBOOK output. Note that enabling this will significantly
|
||||
# increase the size of the DOCBOOK output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
|
||||
|
||||
DOCBOOK_PROGRAMLISTING = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2119,15 +2090,6 @@ EXTERNAL_PAGES = YES
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
|
||||
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
|
||||
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
|
||||
# disabled, but it is recommended to install and use dot, since it yields more
|
||||
# powerful graphs.
|
||||
# The default value is: YES.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
|
||||
@@ -66,7 +66,7 @@ New features
|
||||
+ Introduce ``util::EventEmitter``, :ndn-cxx:`util::NotificationSubscriber`,
|
||||
:ndn-cxx:`util::NotificationStream`, and :ndn-cxx:`nfd::FaceMonitor` utility classes
|
||||
|
||||
+ Introduce :ndn-cxx:`util::SegmentFetcher` helper class to fetch multi-segmented data
|
||||
+ Introduce :ndn-cxx:`SegmentFetcher` helper class to fetch multi-segmented data
|
||||
(:issue:`1879`)
|
||||
|
||||
- **Build**
|
||||
|
||||
@@ -63,27 +63,27 @@ Improvements and bug fixes
|
||||
Deprecated
|
||||
^^^^^^^^^^
|
||||
|
||||
- Old security framework. All old security framework classes are moved to
|
||||
- Old security framework. All old security framework classes are moved to the
|
||||
``ndn::security::v1`` namespace in this release and will be removed in the next release.
|
||||
|
||||
* ``v1::KeyChain``, use :ndn-cxx:`v2::KeyChain` instead
|
||||
* ``v1::KeyChain``; use ``v2::KeyChain`` instead.
|
||||
|
||||
* ``v1::Validator`` interface and all implementations of this interface (``ValidatorRegex``,
|
||||
``ValidatorConfig``, ``ValidatorNull``). Use :ndn-cxx:`v2::Validator` and the
|
||||
corresponding implementations of :ndn-cxx:`ValidationPolicy` interfaces (will be introduced
|
||||
before 0.6.0 release).
|
||||
``ValidatorConfig``, ``ValidatorNull``). Use ``v2::Validator`` and the corresponding
|
||||
implementations of :ndn-cxx:`ValidationPolicy` interfaces (will be introduced before
|
||||
the 0.6.0 release).
|
||||
|
||||
* ``v1::SecPublicInfo`` and its implementation (``SecPublicInfoSqlite``), ``SecTpm`` and its
|
||||
implementations (``SecTpmFile``, ``SecTpmOsx``). These classes are internal implementation
|
||||
and not intended to be used without ``v1::KeyChain``. :ndn-cxx:`v2::KeyChain` internally
|
||||
uses the newly introduced :ndn-cxx:`Pib` and :ndn-cxx:`Tpm` interfaces with their
|
||||
corresponding implementations.
|
||||
and not intended to be used without ``v1::KeyChain``. ``v2::KeyChain`` internally uses
|
||||
the newly introduced :ndn-cxx:`Pib` and :ndn-cxx:`Tpm` interfaces with their corresponding
|
||||
implementations.
|
||||
|
||||
* ``v1::Certificate``, ``v1::IdentityCertificate``, ``v1::CertificateExtension``,
|
||||
``v1::CertificateSubjectDescription``, use :ndn-cxx:`v2::Certificate` and
|
||||
:ndn-cxx:`AdditionalDescription`
|
||||
``v1::CertificateSubjectDescription``; use ``v2::Certificate`` and ``AdditionalDescription``
|
||||
instead.
|
||||
|
||||
* ``v1::SecuredBag``, use ``v2::SafeBag`` instead
|
||||
* ``v1::SecuredBag``; use :ndn-cxx:`SafeBag` instead.
|
||||
|
||||
- Constant ``io::BASE_64``, use ``io::BASE64`` instead (:issue:`3741`)
|
||||
|
||||
|
||||
@@ -102,23 +102,23 @@ Removed
|
||||
|
||||
- Old security framework.
|
||||
|
||||
* ``v1::KeyChain``, use :ndn-cxx:`v2::KeyChain` instead
|
||||
* ``v1::KeyChain``; use :ndn-cxx:`KeyChain` instead.
|
||||
|
||||
* ``v1::Validator`` interface and ``ValidatorRegex`` implementation of this
|
||||
interface. ``ValidatorConfig``, ``ValidatorNull`` implementation refactored to be based on
|
||||
the new validation framework.
|
||||
|
||||
* ``v1::SecPublicInfo`` and its implementation (``SecPublicInfoSqlite``), ``SecTpm`` and its
|
||||
implementations (``SecTpmFile``, ``SecTpmOsx``). These classes are internal implementation
|
||||
and not intended to be used without ``v1::KeyChain``. :ndn-cxx:`v2::KeyChain` internally
|
||||
implementations (``SecTpmFile``, ``SecTpmOsx``). These classes are internal implementation
|
||||
and not intended to be used without ``v1::KeyChain``. The new :ndn-cxx:`KeyChain` internally
|
||||
uses the newly introduced :ndn-cxx:`Pib` and :ndn-cxx:`Tpm` interfaces with their
|
||||
corresponding implementations.
|
||||
|
||||
* ``v1::Certificate``, ``v1::IdentityCertificate``, ``v1::CertificateExtension``,
|
||||
``v1::CertificateSubjectDescription``, use :ndn-cxx:`v2::Certificate` and
|
||||
:ndn-cxx:`AdditionalDescription`
|
||||
``v1::CertificateSubjectDescription``; use the new :ndn-cxx:`Certificate` and
|
||||
:ndn-cxx:`AdditionalDescription` instead.
|
||||
|
||||
* ``v1::SecuredBag``, use ``v2::SafeBag`` instead
|
||||
* ``v1::SecuredBag``; use :ndn-cxx:`SafeBag` instead.
|
||||
|
||||
- Constant ``io::BASE_64``, use ``io::BASE64`` instead (:issue:`3741`)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace asio {
|
||||
namespace boost::asio {
|
||||
|
||||
#if BOOST_VERSION >= 106600
|
||||
class io_context;
|
||||
@@ -34,7 +33,6 @@ using io_service = io_context;
|
||||
class io_service;
|
||||
#endif // BOOST_VERSION >= 106600
|
||||
|
||||
} // namespace asio
|
||||
} // namespace boost
|
||||
} // namespace boost::asio
|
||||
|
||||
#endif // NDN_CXX_DETAIL_ASIO_FWD_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2019 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
#include "ndn-cxx/detail/cancel-handle.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace detail {
|
||||
namespace ndn::detail {
|
||||
|
||||
void
|
||||
CancelHandle::cancel() const
|
||||
@@ -33,5 +32,4 @@ CancelHandle::cancel() const
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ndn
|
||||
} // namespace ndn::detail
|
||||
@@ -24,10 +24,13 @@
|
||||
|
||||
#include "ndn-cxx/detail/common.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace detail {
|
||||
/**
|
||||
* \brief Contains implementation details that are not part of the ndn-cxx public API.
|
||||
*/
|
||||
namespace ndn::detail {
|
||||
|
||||
/** \brief Handle to cancel an operation.
|
||||
/**
|
||||
* \brief Handle to cancel an operation.
|
||||
*/
|
||||
class CancelHandle
|
||||
{
|
||||
@@ -52,7 +55,8 @@ private:
|
||||
inline
|
||||
CancelHandle::CancelHandle() noexcept = default;
|
||||
|
||||
/** \brief Cancels an operation automatically upon destruction.
|
||||
/**
|
||||
* \brief Cancels an operation automatically upon destruction.
|
||||
*/
|
||||
template<typename HandleT>
|
||||
class ScopedCancelHandle
|
||||
@@ -133,7 +137,6 @@ private:
|
||||
template<typename T>
|
||||
ScopedCancelHandle<T>::ScopedCancelHandle() noexcept = default;
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ndn
|
||||
} // namespace ndn::detail
|
||||
|
||||
#endif // NDN_CXX_DETAIL_CANCEL_HANDLE_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -30,8 +30,7 @@
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
namespace ndn {
|
||||
namespace detail {
|
||||
namespace ndn::detail {
|
||||
|
||||
/**
|
||||
* @brief Helper class to wrap CoreFoundation object pointers
|
||||
@@ -145,7 +144,6 @@ private:
|
||||
T m_typeRef;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ndn
|
||||
} // namespace ndn::detail
|
||||
|
||||
#endif // NDN_CXX_DETAIL_CF_RELEASER_OSX_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2019 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -21,9 +21,7 @@
|
||||
|
||||
#include "ndn-cxx/detail/cf-string-osx.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace detail {
|
||||
namespace cfstring {
|
||||
namespace ndn::detail::cfstring {
|
||||
|
||||
CFReleaser<CFStringRef>
|
||||
fromBuffer(const uint8_t* buf, size_t buflen)
|
||||
@@ -66,6 +64,4 @@ toStdString(CFStringRef cfStr)
|
||||
return str;
|
||||
}
|
||||
|
||||
} // namespace cfstring
|
||||
} // namespace detail
|
||||
} // namespace ndn
|
||||
} // namespace ndn::detail::cfstring
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -36,9 +36,7 @@
|
||||
* This file contains utilities to deal with Apple Core Foundation's CFString and related types.
|
||||
*/
|
||||
|
||||
namespace ndn {
|
||||
namespace detail {
|
||||
namespace cfstring {
|
||||
namespace ndn::detail::cfstring {
|
||||
|
||||
/**
|
||||
* @brief Create a CFString by copying bytes from a raw buffer
|
||||
@@ -61,8 +59,6 @@ fromStdString(const std::string& str);
|
||||
std::string
|
||||
toStdString(CFStringRef cfStr);
|
||||
|
||||
} // namespace cfstring
|
||||
} // namespace detail
|
||||
} // namespace ndn
|
||||
} // namespace ndn::detail::cfstring
|
||||
|
||||
#endif // NDN_CXX_DETAIL_CF_STRING_OSX_HPP
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace encoding {
|
||||
namespace ndn::encoding {
|
||||
|
||||
namespace endian = boost::endian;
|
||||
|
||||
@@ -220,5 +219,4 @@ prependBlock<EstimatorTag>(EncodingImpl<EstimatorTag>&, const Block&);
|
||||
template size_t
|
||||
prependBlock<EncoderTag>(EncodingImpl<EncoderTag>&, const Block&);
|
||||
|
||||
} // namespace encoding
|
||||
} // namespace ndn
|
||||
} // namespace ndn::encoding
|
||||
@@ -29,11 +29,9 @@
|
||||
#include "ndn-cxx/encoding/tlv.hpp"
|
||||
#include "ndn-cxx/util/span.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace asio {
|
||||
namespace boost::asio {
|
||||
class const_buffer;
|
||||
} // namespace asio
|
||||
} // namespace boost
|
||||
} // namespace boost::asio
|
||||
|
||||
namespace ndn {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace encoding {
|
||||
namespace ndn::encoding {
|
||||
|
||||
namespace endian = boost::endian;
|
||||
|
||||
@@ -200,5 +199,4 @@ Encoder::appendNonNegativeInteger(uint64_t varNumber)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace encoding
|
||||
} // namespace ndn
|
||||
} // namespace ndn::encoding
|
||||
@@ -26,8 +26,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace ndn {
|
||||
namespace encoding {
|
||||
namespace ndn::encoding {
|
||||
|
||||
/**
|
||||
* @brief Helper class to perform TLV encoding.
|
||||
@@ -278,7 +277,6 @@ Encoder::appendRange(Iterator first, Iterator last)
|
||||
return length;
|
||||
}
|
||||
|
||||
} // namespace encoding
|
||||
} // namespace ndn
|
||||
} // namespace ndn::encoding
|
||||
|
||||
#endif // NDN_CXX_ENCODING_ENCODER_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -26,8 +26,7 @@
|
||||
#include "ndn-cxx/encoding/encoder.hpp"
|
||||
#include "ndn-cxx/encoding/estimator.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace encoding {
|
||||
namespace ndn::encoding {
|
||||
|
||||
/**
|
||||
* @brief EncodingImpl specialization for actual TLV encoding
|
||||
@@ -62,7 +61,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace encoding
|
||||
} // namespace ndn
|
||||
} // namespace ndn::encoding
|
||||
|
||||
#endif // NDN_CXX_ENCODING_ENCODING_BUFFER_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace encoding {
|
||||
namespace ndn::encoding {
|
||||
|
||||
/**
|
||||
* @brief Helper class to estimate size of TLV encoding.
|
||||
@@ -112,7 +111,6 @@ public: // common interface between Encoder and Estimator
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace encoding
|
||||
} // namespace ndn
|
||||
} // namespace ndn::encoding
|
||||
|
||||
#endif // NDN_CXX_ENCODING_ESTIMATOR_HPP
|
||||
@@ -29,8 +29,7 @@
|
||||
#include <map>
|
||||
#include <ostream>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, FaceScope faceScope)
|
||||
@@ -196,5 +195,4 @@ operator<<(std::ostream& os, RouteFlags routeFlags)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -26,8 +26,7 @@
|
||||
#include <iosfwd>
|
||||
#include <limits>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
inline constexpr uint64_t INVALID_FACE_ID = 0;
|
||||
|
||||
@@ -131,7 +130,6 @@ enum RouteFlags : uint64_t {
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, RouteFlags routeFlags);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_ENCODING_NFD_CONSTANTS_HPP
|
||||
@@ -24,9 +24,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace ndn {
|
||||
namespace tlv {
|
||||
namespace nfd {
|
||||
namespace ndn::tlv::nfd {
|
||||
|
||||
/**
|
||||
* @brief TLV-TYPE numbers defined by the NFD Management protocol.
|
||||
@@ -105,8 +103,6 @@ enum : uint32_t {
|
||||
Route = 129,
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace tlv
|
||||
} // namespace ndn
|
||||
} // namespace ndn::tlv::nfd
|
||||
|
||||
#endif // NDN_CXX_ENCODING_TLV_NFD_HPP
|
||||
@@ -24,9 +24,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace ndn {
|
||||
namespace tlv {
|
||||
namespace security {
|
||||
namespace ndn::tlv::security {
|
||||
|
||||
/**
|
||||
* @brief TLV-TYPE numbers for SafeBag and related elements.
|
||||
@@ -37,8 +35,6 @@ enum : uint32_t {
|
||||
EncryptedKey = 129,
|
||||
};
|
||||
|
||||
} // namespace security
|
||||
} // namespace tlv
|
||||
} // namespace ndn
|
||||
} // namespace ndn::tlv::security
|
||||
|
||||
#endif // NDN_CXX_ENCODING_TLV_SECURITY_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -21,8 +21,9 @@
|
||||
|
||||
#include "ndn-cxx/encoding/tlv.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace tlv {
|
||||
#include <ostream>
|
||||
|
||||
namespace ndn::tlv {
|
||||
|
||||
Error::Error(const char* expectedType, uint32_t actualType)
|
||||
: Error("Expecting "s + expectedType + " element, but TLV has type " + to_string(actualType))
|
||||
@@ -81,5 +82,55 @@ operator<<(std::ostream& os, ContentTypeValue ct)
|
||||
return os << static_cast<uint32_t>(ct) << ')';
|
||||
}
|
||||
|
||||
} // namespace tlv
|
||||
} // namespace ndn
|
||||
size_t
|
||||
writeVarNumber(std::ostream& os, uint64_t number)
|
||||
{
|
||||
if (number < 253) {
|
||||
os.put(static_cast<char>(number));
|
||||
return 1;
|
||||
}
|
||||
else if (number <= std::numeric_limits<uint16_t>::max()) {
|
||||
os.put(static_cast<char>(253));
|
||||
uint16_t value = boost::endian::native_to_big(static_cast<uint16_t>(number));
|
||||
os.write(reinterpret_cast<const char*>(&value), 2);
|
||||
return 3;
|
||||
}
|
||||
else if (number <= std::numeric_limits<uint32_t>::max()) {
|
||||
os.put(static_cast<char>(254));
|
||||
uint32_t value = boost::endian::native_to_big(static_cast<uint32_t>(number));
|
||||
os.write(reinterpret_cast<const char*>(&value), 4);
|
||||
return 5;
|
||||
}
|
||||
else {
|
||||
os.put(static_cast<char>(255));
|
||||
uint64_t value = boost::endian::native_to_big(number);
|
||||
os.write(reinterpret_cast<const char*>(&value), 8);
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
|
||||
size_t
|
||||
writeNonNegativeInteger(std::ostream& os, uint64_t integer)
|
||||
{
|
||||
if (integer <= std::numeric_limits<uint8_t>::max()) {
|
||||
os.put(static_cast<char>(integer));
|
||||
return 1;
|
||||
}
|
||||
else if (integer <= std::numeric_limits<uint16_t>::max()) {
|
||||
uint16_t value = boost::endian::native_to_big(static_cast<uint16_t>(integer));
|
||||
os.write(reinterpret_cast<const char*>(&value), 2);
|
||||
return 2;
|
||||
}
|
||||
else if (integer <= std::numeric_limits<uint32_t>::max()) {
|
||||
uint32_t value = boost::endian::native_to_big(static_cast<uint32_t>(integer));
|
||||
os.write(reinterpret_cast<const char*>(&value), 4);
|
||||
return 4;
|
||||
}
|
||||
else {
|
||||
uint64_t value = boost::endian::native_to_big(integer);
|
||||
os.write(reinterpret_cast<const char*>(&value), 8);
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ndn::tlv
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/endian/conversion.hpp>
|
||||
@@ -411,33 +410,6 @@ sizeOfVarNumber(uint64_t number) noexcept
|
||||
number <= std::numeric_limits<uint32_t>::max() ? 5 : 9;
|
||||
}
|
||||
|
||||
inline size_t
|
||||
writeVarNumber(std::ostream& os, uint64_t number)
|
||||
{
|
||||
if (number < 253) {
|
||||
os.put(static_cast<char>(number));
|
||||
return 1;
|
||||
}
|
||||
else if (number <= std::numeric_limits<uint16_t>::max()) {
|
||||
os.put(static_cast<char>(253));
|
||||
uint16_t value = boost::endian::native_to_big(static_cast<uint16_t>(number));
|
||||
os.write(reinterpret_cast<const char*>(&value), 2);
|
||||
return 3;
|
||||
}
|
||||
else if (number <= std::numeric_limits<uint32_t>::max()) {
|
||||
os.put(static_cast<char>(254));
|
||||
uint32_t value = boost::endian::native_to_big(static_cast<uint32_t>(number));
|
||||
os.write(reinterpret_cast<const char*>(&value), 4);
|
||||
return 5;
|
||||
}
|
||||
else {
|
||||
os.put(static_cast<char>(255));
|
||||
uint64_t value = boost::endian::native_to_big(number);
|
||||
os.write(reinterpret_cast<const char*>(&value), 8);
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Iterator>
|
||||
constexpr uint64_t
|
||||
readNonNegativeInteger(size_t len, Iterator& begin, Iterator end)
|
||||
@@ -463,30 +435,6 @@ sizeOfNonNegativeInteger(uint64_t integer) noexcept
|
||||
integer <= std::numeric_limits<uint32_t>::max() ? 4 : 8;
|
||||
}
|
||||
|
||||
inline size_t
|
||||
writeNonNegativeInteger(std::ostream& os, uint64_t integer)
|
||||
{
|
||||
if (integer <= std::numeric_limits<uint8_t>::max()) {
|
||||
os.put(static_cast<char>(integer));
|
||||
return 1;
|
||||
}
|
||||
else if (integer <= std::numeric_limits<uint16_t>::max()) {
|
||||
uint16_t value = boost::endian::native_to_big(static_cast<uint16_t>(integer));
|
||||
os.write(reinterpret_cast<const char*>(&value), 2);
|
||||
return 2;
|
||||
}
|
||||
else if (integer <= std::numeric_limits<uint32_t>::max()) {
|
||||
uint32_t value = boost::endian::native_to_big(static_cast<uint32_t>(integer));
|
||||
os.write(reinterpret_cast<const char*>(&value), 4);
|
||||
return 4;
|
||||
}
|
||||
else {
|
||||
uint64_t value = boost::endian::native_to_big(integer);
|
||||
os.write(reinterpret_cast<const char*>(&value), 8);
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tlv
|
||||
} // namespace ndn
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "ndn-cxx/transport/unix-transport.hpp"
|
||||
#include "ndn-cxx/util/logger.hpp"
|
||||
#include "ndn-cxx/util/scheduler.hpp"
|
||||
#include "ndn-cxx/util/signal.hpp"
|
||||
|
||||
NDN_LOG_INIT(ndn.Face);
|
||||
// INFO level: prefix registration, etc.
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ndn {
|
||||
namespace name {
|
||||
namespace ndn::name {
|
||||
namespace {
|
||||
|
||||
/**
|
||||
@@ -398,7 +397,6 @@ getComponentTypeTable()
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace name
|
||||
} // namespace ndn
|
||||
} // namespace ndn::name
|
||||
|
||||
#endif // NDN_CXX_IMPL_NAME_COMPONENT_TYPES_HPP
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace ndn {
|
||||
namespace detail {
|
||||
namespace ndn::detail {
|
||||
|
||||
using RecordId = uint64_t;
|
||||
|
||||
@@ -92,7 +91,7 @@ public:
|
||||
/**
|
||||
* \brief Insert a record with given ID.
|
||||
*/
|
||||
template<typename ...TArgs>
|
||||
template<typename... TArgs>
|
||||
Record&
|
||||
put(RecordId id, TArgs&&... args)
|
||||
{
|
||||
@@ -115,7 +114,7 @@ public:
|
||||
/**
|
||||
* \brief Insert a record with newly assigned ID.
|
||||
*/
|
||||
template<typename ...TArgs>
|
||||
template<typename... TArgs>
|
||||
Record&
|
||||
insert(TArgs&&... args)
|
||||
{
|
||||
@@ -189,14 +188,13 @@ public:
|
||||
public:
|
||||
/** \brief Signals when container becomes empty
|
||||
*/
|
||||
util::Signal<RecordContainer<T>> onEmpty;
|
||||
signal::Signal<RecordContainer<T>> onEmpty;
|
||||
|
||||
private:
|
||||
Container m_container;
|
||||
std::atomic<RecordId> m_lastId{0};
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ndn
|
||||
} // namespace ndn::detail
|
||||
|
||||
#endif // NDN_CXX_IMPL_RECORD_CONTAINER_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -64,23 +64,20 @@ private:
|
||||
class byArrival;
|
||||
class byEntity;
|
||||
|
||||
typedef boost::multi_index_container<
|
||||
using CleanupIndex = boost::multi_index_container<
|
||||
InMemoryStorageEntry*,
|
||||
boost::multi_index::indexed_by<
|
||||
|
||||
// by Entry itself
|
||||
boost::multi_index::hashed_unique<
|
||||
boost::multi_index::tag<byEntity>,
|
||||
boost::multi_index::identity<InMemoryStorageEntry*>
|
||||
>,
|
||||
|
||||
// by arrival (FIFO)
|
||||
boost::multi_index::sequenced<
|
||||
boost::multi_index::tag<byArrival>
|
||||
>
|
||||
|
||||
>
|
||||
> CleanupIndex;
|
||||
>;
|
||||
|
||||
CleanupIndex m_cleanupIndex;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -91,25 +91,22 @@ private:
|
||||
class byFrequency;
|
||||
class byEntity;
|
||||
|
||||
typedef boost::multi_index_container<
|
||||
using CleanupIndex = boost::multi_index_container<
|
||||
CleanupEntry,
|
||||
boost::multi_index::indexed_by<
|
||||
|
||||
// by Entry itself
|
||||
boost::multi_index::hashed_unique<
|
||||
boost::multi_index::tag<byEntity>,
|
||||
boost::multi_index::member<CleanupEntry, InMemoryStorageEntry*, &CleanupEntry::entry>
|
||||
>,
|
||||
|
||||
// by frequency (LFU)
|
||||
boost::multi_index::ordered_non_unique<
|
||||
boost::multi_index::tag<byFrequency>,
|
||||
boost::multi_index::member<CleanupEntry, uint64_t, &CleanupEntry::frequency>,
|
||||
std::less<uint64_t>
|
||||
>
|
||||
|
||||
>
|
||||
> CleanupIndex;
|
||||
>;
|
||||
|
||||
CleanupIndex m_cleanupIndex;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -73,23 +73,20 @@ private:
|
||||
class byUsedTime;
|
||||
class byEntity;
|
||||
|
||||
typedef boost::multi_index_container<
|
||||
using CleanupIndex = boost::multi_index_container<
|
||||
InMemoryStorageEntry*,
|
||||
boost::multi_index::indexed_by<
|
||||
|
||||
// by Entry itself
|
||||
boost::multi_index::hashed_unique<
|
||||
boost::multi_index::tag<byEntity>,
|
||||
boost::multi_index::identity<InMemoryStorageEntry*>
|
||||
>,
|
||||
|
||||
// by last used time (LRU)
|
||||
boost::multi_index::sequenced<
|
||||
boost::multi_index::tag<byUsedTime>
|
||||
>
|
||||
|
||||
>
|
||||
> CleanupIndex;
|
||||
>;
|
||||
|
||||
CleanupIndex m_cleanupIndex;
|
||||
};
|
||||
|
||||
@@ -45,10 +45,9 @@ public:
|
||||
// multi_index_container to implement storage
|
||||
class byFullName;
|
||||
|
||||
typedef boost::multi_index_container<
|
||||
using Cache = boost::multi_index_container<
|
||||
InMemoryStorageEntry*,
|
||||
boost::multi_index::indexed_by<
|
||||
|
||||
// by Full Name
|
||||
boost::multi_index::ordered_unique<
|
||||
boost::multi_index::tag<byFullName>,
|
||||
@@ -56,9 +55,8 @@ public:
|
||||
&InMemoryStorageEntry::getFullName>,
|
||||
std::less<Name>
|
||||
>
|
||||
|
||||
>
|
||||
> Cache;
|
||||
>;
|
||||
|
||||
/** @brief Represents a self-defined const_iterator for the in-memory storage.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "ndn-cxx/lp/cache-policy.hpp"
|
||||
#include "ndn-cxx/encoding/block-helpers.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, CachePolicyType policy)
|
||||
@@ -132,5 +131,4 @@ CachePolicy::setPolicy(CachePolicyType policy)
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -27,8 +27,7 @@
|
||||
#include "ndn-cxx/encoding/encoding-buffer.hpp"
|
||||
#include "ndn-cxx/lp/tlv.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Indicates the cache policy applied to a Data packet.
|
||||
@@ -101,7 +100,6 @@ private:
|
||||
|
||||
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(CachePolicy);
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_CACHE_POLICY_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
#ifndef NDN_CXX_LP_TLV_EMPTY_VALUE_HPP
|
||||
#define NDN_CXX_LP_TLV_EMPTY_VALUE_HPP
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Represents a zero-length TLV-VALUE.
|
||||
@@ -34,7 +33,6 @@ struct EmptyValue
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_TLV_EMPTY_VALUE_HPP
|
||||
@@ -29,8 +29,7 @@
|
||||
#include <boost/concept/requires.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Indicates that a `uint64_t` field shall be decoded and encoded as a non-negative integer.
|
||||
@@ -206,7 +205,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_FIELD_DECL_HPP
|
||||
@@ -26,8 +26,7 @@
|
||||
|
||||
#include <boost/concept/usage.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Indicates where a field may occur.
|
||||
@@ -67,7 +66,6 @@ struct Field
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_FIELD_HPP
|
||||
@@ -33,8 +33,7 @@
|
||||
|
||||
#include <boost/mpl/set.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Declare the Fragment field.
|
||||
@@ -134,7 +133,6 @@ using FieldSet = boost::mpl::set<
|
||||
PrefixAnnouncementField
|
||||
>;
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_FIELDS_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
#include "ndn-cxx/lp/nack-header.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, NackReason reason)
|
||||
@@ -138,5 +137,4 @@ NackHeader::setReason(NackReason reason)
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -28,8 +28,7 @@
|
||||
#include "ndn-cxx/encoding/encoding-buffer.hpp"
|
||||
#include "ndn-cxx/lp/tlv.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Indicates the reason type of a %Network %Nack.
|
||||
@@ -95,7 +94,6 @@ private:
|
||||
|
||||
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(NackHeader);
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_NACK_HEADER_HPP
|
||||
+3
-5
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2019 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
#include "ndn-cxx/lp/nack.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
Nack::Nack() = default;
|
||||
|
||||
@@ -38,5 +37,4 @@ Nack::Nack(Interest&& interest)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
+3
-5
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -28,8 +28,7 @@
|
||||
#include "ndn-cxx/detail/packet-base.hpp"
|
||||
#include "ndn-cxx/lp/nack-header.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Represents a %Network %Nack.
|
||||
@@ -105,7 +104,6 @@ private:
|
||||
NackHeader m_header;
|
||||
};
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_NACK_HPP
|
||||
@@ -25,8 +25,7 @@
|
||||
#include <boost/mpl/for_each.hpp>
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -161,5 +160,4 @@ Packet::comparePos(uint32_t first, const Block& second) noexcept
|
||||
return compareFieldSortOrder(FieldInfo(first), FieldInfo(second.type()));
|
||||
}
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
@@ -24,11 +24,10 @@
|
||||
|
||||
#include "ndn-cxx/lp/fields.hpp"
|
||||
|
||||
namespace ndn {
|
||||
/**
|
||||
* @brief Contains classes and functions related to NDNLPv2.
|
||||
*/
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
class Packet
|
||||
{
|
||||
@@ -208,7 +207,6 @@ private:
|
||||
mutable Block m_wire{tlv::LpPacket};
|
||||
};
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_PACKET_HPP
|
||||
@@ -23,8 +23,7 @@
|
||||
#include "ndn-cxx/encoding/tlv.hpp"
|
||||
#include "ndn-cxx/util/string-helper.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
constexpr size_t LENGTH_MIN = 1;
|
||||
constexpr size_t LENGTH_MAX = 32;
|
||||
@@ -45,5 +44,4 @@ operator<<(std::ostream& os, const PitToken& pitToken)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/buffer.hpp"
|
||||
#include "ndn-cxx/tag.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/** \brief Represent a PIT token field.
|
||||
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2#PIT-Token
|
||||
@@ -67,7 +66,6 @@ private:
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const PitToken& pitToken);
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_PIT_TOKEN_HPP
|
||||
@@ -22,8 +22,7 @@
|
||||
#include "ndn-cxx/lp/prefix-announcement-header.hpp"
|
||||
#include "ndn-cxx/lp/tlv.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
PrefixAnnouncementHeader::PrefixAnnouncementHeader() = default;
|
||||
|
||||
@@ -67,5 +66,4 @@ PrefixAnnouncementHeader::wireDecode(const Block& wire)
|
||||
wire.parse();
|
||||
m_prefixAnn.emplace(Data(wire.get(ndn::tlv::Data)));
|
||||
}
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/prefix-announcement.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/** \brief Represents a PrefixAnnouncement header field in NDNLP.
|
||||
*/
|
||||
@@ -73,7 +72,6 @@ private:
|
||||
|
||||
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(PrefixAnnouncementHeader);
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_PREFIX_ANNOUNCEMENT_HEADER_HPP
|
||||
@@ -26,15 +26,13 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \brief Represents a sequence number.
|
||||
*/
|
||||
using Sequence = uint64_t;
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_SEQUENCE_HPP
|
||||
+3
-5
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -27,8 +27,7 @@
|
||||
#include "ndn-cxx/lp/prefix-announcement-header.hpp"
|
||||
#include "ndn-cxx/tag.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
namespace ndn::lp {
|
||||
|
||||
/**
|
||||
* \class IncomingFaceIdTag
|
||||
@@ -78,7 +77,6 @@ using NonDiscoveryTag = SimpleTag<EmptyValue, 14>;
|
||||
*/
|
||||
using PrefixAnnouncementTag = SimpleTag<PrefixAnnouncementHeader, 15>;
|
||||
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp
|
||||
|
||||
#endif // NDN_CXX_LP_TAGS_HPP
|
||||
+2
-6
@@ -24,12 +24,10 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace ndn {
|
||||
namespace lp {
|
||||
/**
|
||||
* @brief Contains constants related to the NDNLPv2 packet format.
|
||||
*/
|
||||
namespace tlv {
|
||||
namespace ndn::lp::tlv {
|
||||
|
||||
/**
|
||||
* @brief TLV-TYPE numbers for NDNLPv2.
|
||||
@@ -72,8 +70,6 @@ enum : uint32_t {
|
||||
HEADER3_MAX = 959,
|
||||
};
|
||||
|
||||
} // namespace tlv
|
||||
} // namespace lp
|
||||
} // namespace ndn
|
||||
} // namespace ndn::lp::tlv
|
||||
|
||||
#endif // NDN_CXX_LP_TLV_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
namespace ndn::mgmt {
|
||||
|
||||
/**
|
||||
* \brief Base class for a struct that contains ControlCommand parameters.
|
||||
@@ -43,7 +42,6 @@ public:
|
||||
wireEncode() const = 0;
|
||||
};
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
|
||||
#endif // NDN_CXX_MGMT_CONTROL_PARAMETERS_HPP
|
||||
@@ -23,8 +23,7 @@
|
||||
#include "ndn-cxx/encoding/block-helpers.hpp"
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
namespace ndn::mgmt {
|
||||
|
||||
ControlResponse::ControlResponse() = default;
|
||||
|
||||
@@ -110,5 +109,4 @@ ControlResponse::wireDecode(const Block& wire)
|
||||
m_body = {};
|
||||
}
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
namespace ndn::mgmt {
|
||||
|
||||
/**
|
||||
* \brief ControlCommand response.
|
||||
@@ -97,7 +96,6 @@ private: // non-member operators
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
|
||||
#endif // NDN_CXX_MGMT_CONTROL_RESPONSE_HPP
|
||||
@@ -25,10 +25,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
NDN_LOG_INIT(ndn.mgmt.Dispatcher);
|
||||
namespace ndn::mgmt {
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
NDN_LOG_INIT(ndn.mgmt.Dispatcher);
|
||||
|
||||
Authorization
|
||||
makeAcceptAllAuthorization()
|
||||
@@ -343,5 +342,4 @@ Dispatcher::postNotification(const Block& notification, const PartialName& relPr
|
||||
sendData(streamName, notification, {}, SendDestination::FACE_AND_IMS);
|
||||
}
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
namespace ndn::mgmt {
|
||||
|
||||
// ---- AUTHORIZATION ----
|
||||
|
||||
@@ -488,7 +487,6 @@ Dispatcher::addControlCommand(const PartialName& relPrefix,
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
|
||||
#endif // NDN_CXX_MGMT_DISPATCHER_HPP
|
||||
@@ -23,8 +23,7 @@
|
||||
#include "ndn-cxx/encoding/block-helpers.hpp"
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
ChannelStatus::ChannelStatus() = default;
|
||||
|
||||
@@ -102,5 +101,4 @@ operator<<(std::ostream& os, const ChannelStatus& status)
|
||||
return os << "Channel(LocalUri: " << status.getLocalUri() << ")";
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -86,7 +85,6 @@ operator!=(const ChannelStatus& a, const ChannelStatus& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const ChannelStatus& status);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_CHANNEL_STATUS_HPP
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/nfd/command-options.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
CommandOptions&
|
||||
CommandOptions::setTimeout(time::milliseconds timeout)
|
||||
@@ -48,5 +47,4 @@ CommandOptions::setSigningInfo(security::SigningInfo signingInfo)
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/security/signing-info.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -106,7 +105,6 @@ private:
|
||||
security::SigningInfo m_signingInfo;
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_COMMAND_OPTIONS_HPP
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/nfd/control-command.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
ControlCommand::ControlCommand(const std::string& module, const std::string& verb)
|
||||
: m_module(module)
|
||||
@@ -419,5 +418,4 @@ RibUnregisterCommand::validateResponse(const ControlParameters& parameters) cons
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/nfd/control-parameters.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -319,7 +318,6 @@ public:
|
||||
validateResponse(const ControlParameters& parameters) const override;
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_CONTROL_COMMAND_HPP
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
#include "ndn-cxx/util/string-helper.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
ControlParameters::ControlParameters()
|
||||
: m_hasFields(CONTROL_PARAMETER_UBOUND)
|
||||
@@ -379,5 +378,4 @@ operator<<(std::ostream& os, const ControlParameters& parameters)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -27,8 +27,7 @@
|
||||
#include "ndn-cxx/mgmt/control-parameters.hpp"
|
||||
#include "ndn-cxx/util/time.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -662,7 +661,6 @@ NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ControlParameters);
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const ControlParameters& parameters);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,12 +24,10 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/control-response.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
using ControlResponse = mgmt::ControlResponse;
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_CONTROL_RESPONSE_HPP
|
||||
@@ -25,10 +25,7 @@
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
|
||||
using ndn::util::SegmentFetcher;
|
||||
namespace ndn::nfd {
|
||||
|
||||
Controller::Controller(Face& face, KeyChain& keyChain, security::Validator& validator)
|
||||
: m_face(face)
|
||||
@@ -184,5 +181,4 @@ Controller::processDatasetFetchError(const DatasetFailureCallback& onFailure,
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -34,6 +34,9 @@ namespace ndn {
|
||||
|
||||
class Face;
|
||||
|
||||
/**
|
||||
* @brief Contains classes and functions related to the NFD Management protocol.
|
||||
*/
|
||||
namespace nfd {
|
||||
|
||||
/**
|
||||
@@ -178,7 +181,7 @@ protected:
|
||||
security::InterestSigner m_signer;
|
||||
|
||||
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
|
||||
std::set<shared_ptr<util::SegmentFetcher>> m_fetchers;
|
||||
std::set<shared_ptr<SegmentFetcher>> m_fetchers;
|
||||
};
|
||||
|
||||
template<typename Dataset>
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "ndn-cxx/encoding/encoding-buffer.hpp"
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
CsInfo::CsInfo() = default;
|
||||
|
||||
@@ -190,5 +189,4 @@ operator<<(std::ostream& os, const CsInfo& csi)
|
||||
<< csi.getNMisses() << (csi.getNMisses() == 1 ? " miss" : " misses");
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <bitset>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/** \ingroup management
|
||||
* \brief Represents the CS Information dataset.
|
||||
@@ -150,7 +149,6 @@ operator!=(const CsInfo& a, const CsInfo& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const CsInfo& csi);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_CS_INFO_HPP
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
#include "ndn-cxx/util/string-helper.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
FaceEventNotification::FaceEventNotification() = default;
|
||||
|
||||
@@ -185,5 +184,4 @@ operator<<(std::ostream& os, const FaceEventNotification& notification)
|
||||
return os << " )";
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/nfd/face-traits.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -84,7 +83,6 @@ operator!=(const FaceEventNotification& a, const FaceEventNotification& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const FaceEventNotification& notification);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FACE_EVENT_NOTIFICATION_HPP
|
||||
@@ -31,8 +31,7 @@
|
||||
#include "ndn-cxx/mgmt/nfd/face-event-notification.hpp"
|
||||
#include "ndn-cxx/util/notification-subscriber.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \brief A subscriber for the %Face status change notification stream.
|
||||
@@ -48,7 +47,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FACE_MONITOR_HPP
|
||||
@@ -23,8 +23,7 @@
|
||||
#include "ndn-cxx/encoding/block-helpers.hpp"
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
FaceQueryFilter::FaceQueryFilter() = default;
|
||||
|
||||
@@ -336,5 +335,4 @@ operator<<(std::ostream& os, const FaceQueryFilter& filter)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -230,7 +229,6 @@ operator!=(const FaceQueryFilter& a, const FaceQueryFilter& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const FaceQueryFilter& filter);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FACE_QUERY_FILTER_HPP
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
#include "ndn-cxx/util/string-helper.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
FaceStatus::FaceStatus() = default;
|
||||
|
||||
@@ -460,5 +459,4 @@ operator<<(std::ostream& os, const FaceStatus& status)
|
||||
return os << " )";
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -249,7 +248,6 @@ operator!=(const FaceStatus& a, const FaceStatus& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const FaceStatus& status);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FACE_STATUS_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
#include "ndn-cxx/encoding/nfd-constants.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -191,7 +190,6 @@ protected:
|
||||
mutable Block m_wire;
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FACE_TRAITS_HPP
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
NextHopRecord::NextHopRecord() = default;
|
||||
|
||||
@@ -264,5 +263,4 @@ operator<<(std::ostream& os, const FibEntry& entry)
|
||||
return os << " )";
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/nfd-constants.hpp"
|
||||
#include "ndn-cxx/name.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/** \ingroup management
|
||||
* \sa https://redmine.named-data.net/projects/nfd/wiki/FibMgmt#FIB-Dataset
|
||||
@@ -173,7 +172,6 @@ operator!=(const FibEntry& a, const FibEntry& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const FibEntry& entry);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FIB_ENTRY_HPP
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "ndn-cxx/encoding/encoding-buffer.hpp"
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
ForwarderStatus::ForwarderStatus() = default;
|
||||
|
||||
@@ -231,7 +230,7 @@ ForwarderStatus::setNfdVersion(const std::string& nfdVersion)
|
||||
}
|
||||
|
||||
ForwarderStatus&
|
||||
ForwarderStatus::setStartTimestamp(const time::system_clock::TimePoint& startTimestamp)
|
||||
ForwarderStatus::setStartTimestamp(const time::system_clock::time_point& startTimestamp)
|
||||
{
|
||||
m_wire.reset();
|
||||
m_startTimestamp = startTimestamp;
|
||||
@@ -239,7 +238,7 @@ ForwarderStatus::setStartTimestamp(const time::system_clock::TimePoint& startTim
|
||||
}
|
||||
|
||||
ForwarderStatus&
|
||||
ForwarderStatus::setCurrentTimestamp(const time::system_clock::TimePoint& currentTimestamp)
|
||||
ForwarderStatus::setCurrentTimestamp(const time::system_clock::time_point& currentTimestamp)
|
||||
{
|
||||
m_wire.reset();
|
||||
m_currentTimestamp = currentTimestamp;
|
||||
@@ -395,5 +394,4 @@ operator<<(std::ostream& os, const ForwarderStatus& status)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
#include "ndn-cxx/util/time.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -249,7 +248,6 @@ operator!=(const ForwarderStatus& a, const ForwarderStatus& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const ForwarderStatus& status);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_FORWARDER_STATUS_HPP
|
||||
@@ -28,8 +28,7 @@
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
Route::Route() = default;
|
||||
|
||||
@@ -341,5 +340,4 @@ operator<<(std::ostream& os, const RibEntry& entry)
|
||||
return os << " )";
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -27,8 +27,7 @@
|
||||
#include "ndn-cxx/name.hpp"
|
||||
#include "ndn-cxx/util/time.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -225,7 +224,6 @@ operator!=(const RibEntry& a, const RibEntry& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const RibEntry& entry);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_RIB_ENTRY_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "ndn-cxx/encoding/nfd-constants.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -54,7 +53,6 @@ protected:
|
||||
RouteFlagsTraits() = default;
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_ROUTE_FLAGS_TRAITS_HPP
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/nfd/status-dataset.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
Name
|
||||
StatusDatasetBase::getDatasetPrefix(const Name& prefix) const
|
||||
@@ -158,5 +157,4 @@ RibDataset::parseResult(ConstBufferPtr payload) const
|
||||
return parseDatasetVector<RibEntry>(payload);
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -32,8 +32,7 @@
|
||||
#include "ndn-cxx/mgmt/nfd/strategy-choice.hpp"
|
||||
#include "ndn-cxx/mgmt/nfd/rib-entry.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \brief Exception raised when the fetched payload cannot be parsed as a StatusDataset.
|
||||
@@ -211,7 +210,6 @@ public:
|
||||
parseResult(ConstBufferPtr payload) const;
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_STATUS_DATASET_HPP
|
||||
@@ -24,8 +24,7 @@
|
||||
#include "ndn-cxx/encoding/encoding-buffer.hpp"
|
||||
#include "ndn-cxx/encoding/tlv-nfd.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
StrategyChoice::StrategyChoice() = default;
|
||||
|
||||
@@ -131,5 +130,4 @@ operator<<(std::ostream& os, const StrategyChoice& sc)
|
||||
<< ")";
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/encoding/block.hpp"
|
||||
#include "ndn-cxx/name.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace nfd {
|
||||
namespace ndn::nfd {
|
||||
|
||||
/**
|
||||
* \ingroup management
|
||||
@@ -97,7 +96,6 @@ operator!=(const StrategyChoice& a, const StrategyChoice& b)
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const StrategyChoice& sc);
|
||||
|
||||
} // namespace nfd
|
||||
} // namespace ndn
|
||||
} // namespace ndn::nfd
|
||||
|
||||
#endif // NDN_CXX_MGMT_NFD_STRATEGY_CHOICE_HPP
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
#include "ndn-cxx/mgmt/status-dataset-context.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
namespace ndn::mgmt {
|
||||
|
||||
constexpr size_t MAX_PAYLOAD_LENGTH = MAX_NDN_PACKET_SIZE - 800;
|
||||
|
||||
@@ -106,5 +105,4 @@ StatusDatasetContext::reject(const ControlResponse& resp)
|
||||
m_nackSender(resp);
|
||||
}
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2022 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -25,8 +25,7 @@
|
||||
#include "ndn-cxx/interest.hpp"
|
||||
#include "ndn-cxx/mgmt/control-response.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace mgmt {
|
||||
namespace ndn::mgmt {
|
||||
|
||||
/**
|
||||
* \brief Provides a context for generating the response to a StatusDataset request.
|
||||
@@ -109,7 +108,6 @@ private:
|
||||
State m_state = State::INITIAL;
|
||||
};
|
||||
|
||||
} // namespace mgmt
|
||||
} // namespace ndn
|
||||
} // namespace ndn::mgmt
|
||||
|
||||
#endif // NDN_CXX_MGMT_STATUS_DATASET_CONTEXT_HPP
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
#include <boost/logic/tribool.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace name {
|
||||
namespace ndn::name {
|
||||
|
||||
static Convention g_conventionEncoding = Convention::TYPED;
|
||||
static Convention g_conventionDecoding = Convention::EITHER;
|
||||
@@ -510,5 +509,4 @@ Component::wireDecode(const Block& wire)
|
||||
// validity check is done within Component(const Block& wire)
|
||||
}
|
||||
|
||||
} // namespace name
|
||||
} // namespace ndn
|
||||
} // namespace ndn::name
|
||||
@@ -26,8 +26,7 @@
|
||||
#include "ndn-cxx/encoding/block-helpers.hpp"
|
||||
#include "ndn-cxx/util/time.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace name {
|
||||
namespace ndn::name {
|
||||
|
||||
/**
|
||||
* @brief Format used for the URI representation of a name.
|
||||
@@ -592,7 +591,6 @@ private: // non-member operators
|
||||
|
||||
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(Component);
|
||||
|
||||
} // namespace name
|
||||
} // namespace ndn
|
||||
} // namespace ndn::name
|
||||
|
||||
#endif // NDN_CXX_NAME_COMPONENT_HPP
|
||||
+3
-5
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -28,8 +28,7 @@
|
||||
#include <boost/asio/post.hpp>
|
||||
#endif
|
||||
|
||||
namespace ndn {
|
||||
namespace dns {
|
||||
namespace ndn::dns {
|
||||
|
||||
class Resolver : noncopyable
|
||||
{
|
||||
@@ -169,5 +168,4 @@ syncResolve(const std::string& host,
|
||||
return it->endpoint().address();
|
||||
}
|
||||
|
||||
} // namespace dns
|
||||
} // namespace ndn
|
||||
} // namespace ndn::dns
|
||||
+2
-4
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <boost/asio/ip/address.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace dns {
|
||||
namespace ndn::dns {
|
||||
|
||||
using IpAddress = boost::asio::ip::address;
|
||||
using AddressSelector = std::function<bool(const IpAddress&)>;
|
||||
@@ -109,7 +108,6 @@ syncResolve(const std::string& host,
|
||||
boost::asio::io_service& ioService,
|
||||
const AddressSelector& addressSelector = AnyAddress());
|
||||
|
||||
} // namespace dns
|
||||
} // namespace ndn
|
||||
} // namespace ndn::dns
|
||||
|
||||
#endif // NDN_CXX_NET_DNS_HPP
|
||||
@@ -34,8 +34,7 @@
|
||||
#include <cstdio>
|
||||
#include <ostream>
|
||||
|
||||
namespace ndn {
|
||||
namespace ethernet {
|
||||
namespace ndn::ethernet {
|
||||
|
||||
Address::Address()
|
||||
{
|
||||
@@ -130,8 +129,7 @@ operator<<(std::ostream& o, const Address& a)
|
||||
return o << a.toString();
|
||||
}
|
||||
|
||||
} // namespace ethernet
|
||||
} // namespace ndn
|
||||
} // namespace ndn::ethernet
|
||||
|
||||
std::size_t
|
||||
std::hash<ndn::ethernet::Address>::operator()(const ndn::ethernet::Address& a) const noexcept
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace ndn {
|
||||
namespace ethernet {
|
||||
namespace ndn::ethernet {
|
||||
|
||||
inline constexpr uint16_t ETHERTYPE_NDN = 0x8624; ///< The NDN Ethertype
|
||||
|
||||
@@ -110,8 +109,7 @@ getDefaultMulticastAddress();
|
||||
std::ostream&
|
||||
operator<<(std::ostream& o, const Address& a);
|
||||
|
||||
} // namespace ethernet
|
||||
} // namespace ndn
|
||||
} // namespace ndn::ethernet
|
||||
|
||||
namespace std {
|
||||
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
#import <CoreWLAN/CWInterface.h>
|
||||
#import <CoreWLAN/CWWiFiClient.h>
|
||||
|
||||
namespace ndn {
|
||||
namespace net {
|
||||
namespace detail {
|
||||
namespace ndn::net::detail {
|
||||
|
||||
ndn::nfd::LinkType
|
||||
getLinkType(const std::string& ifName)
|
||||
@@ -61,6 +59,4 @@ getLinkType(const std::string& ifName)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace net
|
||||
} // namespace ndn
|
||||
} // namespace ndn::net::detail
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2018 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -26,9 +26,7 @@
|
||||
// implemented in link-type-helper-osx.mm
|
||||
#else
|
||||
|
||||
namespace ndn {
|
||||
namespace net {
|
||||
namespace detail {
|
||||
namespace ndn::net::detail {
|
||||
|
||||
ndn::nfd::LinkType
|
||||
getLinkType(const std::string& ifName)
|
||||
@@ -36,8 +34,6 @@ getLinkType(const std::string& ifName)
|
||||
return nfd::LINK_TYPE_NONE;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace net
|
||||
} // namespace ndn
|
||||
} // namespace ndn::net::detail
|
||||
|
||||
#endif // NDN_CXX_HAVE_OSX_FRAMEWORKS
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace ndn {
|
||||
namespace net {
|
||||
namespace detail {
|
||||
namespace ndn::net::detail {
|
||||
|
||||
/**
|
||||
* @brief Obtain information about WiFi link type
|
||||
@@ -36,8 +34,6 @@ namespace detail {
|
||||
ndn::nfd::LinkType
|
||||
getLinkType(const std::string& ifName);
|
||||
|
||||
} // namespace detail
|
||||
} // namespace net
|
||||
} // namespace ndn
|
||||
} // namespace ndn::net::detail
|
||||
|
||||
#endif // NDN_CXX_NET_IMPL_LINK_TYPE_HELPER_HPP
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2018 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -28,9 +28,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <linux/if.h>
|
||||
|
||||
namespace ndn {
|
||||
namespace net {
|
||||
namespace linux_if {
|
||||
namespace ndn::net::linux_if {
|
||||
|
||||
const uint32_t FLAG_LOWER_UP = IFF_LOWER_UP;
|
||||
const uint32_t FLAG_DORMANT = IFF_DORMANT;
|
||||
@@ -44,8 +42,6 @@ const uint8_t OPER_STATE_TESTING = IF_OPER_TESTING;
|
||||
const uint8_t OPER_STATE_DORMANT = IF_OPER_DORMANT;
|
||||
const uint8_t OPER_STATE_UP = IF_OPER_UP;
|
||||
|
||||
} // namespace linux_if
|
||||
} // namespace net
|
||||
} // namespace ndn
|
||||
} // namespace ndn::net::linux_if
|
||||
|
||||
#endif // __linux__
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2013-2021 Regents of the University of California.
|
||||
* Copyright (c) 2013-2023 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
*
|
||||
@@ -27,9 +27,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace ndn {
|
||||
namespace net {
|
||||
namespace linux_if {
|
||||
namespace ndn::net::linux_if {
|
||||
|
||||
// linux/if.h and net/if.h cannot be (directly or indirectly) included in the
|
||||
// same translation unit because they contain duplicate declarations, therefore
|
||||
@@ -50,9 +48,7 @@ extern const uint8_t OPER_STATE_TESTING;
|
||||
extern const uint8_t OPER_STATE_DORMANT;
|
||||
extern const uint8_t OPER_STATE_UP;
|
||||
|
||||
} // namespace linux_if
|
||||
} // namespace net
|
||||
} // namespace ndn
|
||||
} // namespace ndn::net::linux_if
|
||||
|
||||
#endif // __linux__
|
||||
#endif // NDN_CXX_NET_LINUX_IF_CONSTANTS_HPP
|
||||
@@ -42,8 +42,7 @@
|
||||
|
||||
#include <boost/asio/ip/address.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace net {
|
||||
namespace ndn::net {
|
||||
|
||||
template<typename T>
|
||||
constexpr size_t
|
||||
@@ -270,7 +269,6 @@ private:
|
||||
std::map<uint16_t, const T*> m_attrs;
|
||||
};
|
||||
|
||||
} // namespace net
|
||||
} // namespace ndn
|
||||
} // namespace ndn::net
|
||||
|
||||
#endif // NDN_CXX_NET_NETLINK_MESSAGE_HPP
|
||||
Loaded 100 of 494 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user