tlv: limit TLV-TYPE to 32 bits
refs #4895
Change-Id: I1997e85c8cfcf042133f52bafac015f095381cd2
diff --git a/name.rst b/name.rst
index 3a88031..df3e8e6 100644
--- a/name.rst
+++ b/name.rst
@@ -47,8 +47,6 @@
``Name`` element containing a sub-element out of this range is invalid and the packet SHOULD be dropped.
This requirement overrides the TLV evolvability guidelines.
-Name component with TLV-TYPE ``0`` (zero) is reserved to indicate an invalid name component.
-
NDN URI Scheme
~~~~~~~~~~~~~~
diff --git a/tlv.rst b/tlv.rst
index 5741ea1..38d5e39 100644
--- a/tlv.rst
+++ b/tlv.rst
@@ -89,8 +89,10 @@
TLV-VALUE := BYTE+
+TLV-TYPE MUST be in the range ``1-4294967295`` (inclusive).
+Zero is reserved to indicate an invalid TLV element and MUST NOT appear on the wire.
TLV-TYPE SHOULD be unique at all nested levels.
-The TLV Type number space and initial assignments listed in Section :ref:`types` of this document.
+Section :ref:`types` of this document lists initial TLV-TYPE assignments.
The ``TLV-LENGTH`` field indicates number of bytes that ``TLV-VALUE`` uses.
It **does not** include number of bytes that ``TLV-TYPE`` and ``TLV-LENGTH`` fields themselves occupy.
diff --git a/types.rst b/types.rst
index 7f5289c..1023cc7 100644
--- a/types.rst
+++ b/types.rst
@@ -84,10 +84,6 @@
+----------------+-----------------------------------------------------------+
| Number range | Designation |
+================+===========================================================+
-| 0, 3, 4, | |
-| 35, 37, 39, | |
-| 41-79 | Reserved for future assignments (1-byte encoding) |
-+----------------+-----------------------------------------------------------+
| 9 | Reserved, formerly `Selectors` |
+----------------+-----------------------------------------------------------+
| 11 | Reserved, formerly `Scope` |
@@ -106,21 +102,26 @@
+----------------+-----------------------------------------------------------+
| 32 | Reserved, formerly `SelectedDelegation` |
+----------------+-----------------------------------------------------------+
-| 80-100 | Reserved for assignments related to local-link data |
+| [80, 100] | Reserved for assignments related to local-link data |
| | processing, e.g., `NDNLP`_, etc. (1-byte encoding) |
+----------------+-----------------------------------------------------------+
-| 101-127 | Reserved for assignments related to the forwarder |
+| [101, 127] | Reserved for assignments related to the forwarder |
| | (1-byte encoding) |
+----------------+-----------------------------------------------------------+
-| 128-252 | For application use (1-byte encoding) |
+| all other | |
+| numbers in | |
+| [1, 127] | Reserved for future assignments (1-byte encoding) |
+----------------+-----------------------------------------------------------+
-| 800-1000 | Reserved for assignments related to local-link data |
+| [128, 252] | For application use (1-byte encoding) |
++----------------+-----------------------------------------------------------+
+| [800, 1000] | Reserved for assignments related to local-link data |
| | processing, e.g., `NDNLP`_, etc. (3-byte encoding) |
+----------------+-----------------------------------------------------------+
-| 253-799, | Reserved for future assignments (3-byte encoding) |
-| 1001-32767 | |
+| all other | Reserved for future assignments (3-byte encoding) |
+| numbers in | |
+| [253, 32767] | |
+----------------+-----------------------------------------------------------+
-| >32767 | For application use (3+-byte encoding) |
+| >32767 | For application use (3-byte or 5-byte encoding) |
+----------------+-----------------------------------------------------------+
.. _NDNLP: https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2