Refer to TLV-TYPE as "number" instead of "code"
refs #2880 Change-Id: Ie3bd9dc4cb5ca4c3f7aafeed37266adba88b82fb
This commit is contained in:
1 parent
d2777fa4ed
commit
7d3c14b3ae
3 files changed
+8
-6
No files matched your search
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
/** \brief encode into wire format
|
||||
* \param encoder either an EncodingBuffer or an EncodingEstimator
|
||||
* \param type TLV-TYPE code, either Content (for \p Link) or ForwardingHint
|
||||
* \param type TLV-TYPE number, either Content (for \p Link) or ForwardingHint
|
||||
* \throw std::invalid_argument \p type is invalid
|
||||
* \throw Error there is no Delegation
|
||||
*/
|
||||
|
||||
@@ -57,6 +57,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief TLV-TYPE numbers defined in NDN Packet Format
|
||||
* @sa https://named-data.net/doc/ndn-tlv/types.html
|
||||
*/
|
||||
enum {
|
||||
Interest = 5,
|
||||
Data = 6,
|
||||
@@ -103,11 +106,10 @@ enum SignatureTypeValue {
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const SignatureTypeValue& signatureType);
|
||||
|
||||
/** @brief TLV codes for SignatureInfo features
|
||||
/** @brief TLV-TYPE numbers for SignatureInfo features
|
||||
* @sa docs/tutorials/certificate-format.rst
|
||||
*/
|
||||
enum {
|
||||
// SignatureInfo TLVs
|
||||
ValidityPeriod = 253,
|
||||
NotBefore = 254,
|
||||
NotAfter = 255,
|
||||
@@ -404,7 +406,7 @@ readType(Iterator& begin, const Iterator& end)
|
||||
{
|
||||
uint64_t type = readVarNumber(begin, end);
|
||||
if (type > std::numeric_limits<uint32_t>::max()) {
|
||||
BOOST_THROW_EXCEPTION(Error("TLV-TYPE code exceeds allowed maximum"));
|
||||
BOOST_THROW_EXCEPTION(Error("TLV-TYPE number exceeds allowed maximum"));
|
||||
}
|
||||
|
||||
return static_cast<uint32_t>(type);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2013-2017 Regents of the University of California.
|
||||
*
|
||||
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
|
||||
@@ -27,7 +27,7 @@ namespace lp {
|
||||
namespace tlv {
|
||||
|
||||
/**
|
||||
* \brief TLV-TYPE code assignments for NDNLPv2
|
||||
* \brief TLV-TYPE numbers for NDNLPv2
|
||||
*/
|
||||
enum {
|
||||
LpPacket = 100,
|
||||
|
||||
Reference in new issue
Block a user