Prepare release 22.02

Change-Id: Ie0d8db596c11c4f298755aa4b7fde5e616f32ceb
Refs: #5172, #5184
diff --git a/core/version.hpp.in b/core/version.hpp.in
index 6d62bc7..c9d8a4d 100644
--- a/core/version.hpp.in
+++ b/core/version.hpp.in
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,14 +26,15 @@
 #ifndef NFD_CORE_VERSION_HPP
 #define NFD_CORE_VERSION_HPP
 
-// NFD version follows Semantic Versioning 2.0.0
+// NFD version follows Semantic Versioning 2.0.0 based on year and month of the release
 // https://semver.org/spec/v2.0.0.html
 //
-// To change version number, modify VERSION variable in top-level wscript.
+// To change version number, modify the VERSION variable in the top-level wscript.
 
-/** \brief NFD version represented as an integer.
+/**
+ * \brief NFD version represented as an integer.
  *
- *  Equivalent to: `#NFD_VERSION_MAJOR*1000000 + #NFD_VERSION_MINOR*1000 + #NFD_VERSION_PATCH`
+ * Equivalent to: #NFD_VERSION_MAJOR*1000000 + #NFD_VERSION_MINOR*1000 + #NFD_VERSION_PATCH
  */
 #define NFD_VERSION @VERSION@
 
@@ -44,7 +45,8 @@
 /// The patch version of NFD
 #define NFD_VERSION_PATCH @VERSION_PATCH@
 
-/** \brief NFD version represented as a string.
+/**
+ * \brief NFD version represented as a string.
  *
  * Format:
  * @code
@@ -53,20 +55,21 @@
  */
 extern const char NFD_VERSION_STRING[];
 
-/** \brief NFD version string, including git commit information, if NFD is build from
- *         specific git commit.
+/**
+ * \brief NFD version string, including git commit information if NFD is build from a
+ *        specific git commit.
  *
  * #NFD_VERSION_BUILD_STRING is obtained using the following command (`NFD-` prefix is
- * afterwards removed): `git describe --match 'NFD-*'`
+ * afterwards removed): ``git describe --match 'NFD-*'``
  *
  * When NFD is not built from git, #NFD_VERSION_BUILD_STRING equals #NFD_VERSION_STRING.
  *
  * Format:
  * @code
- * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
+ * MAJOR.MINOR(.PATCH)(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
  * @endcode
  *
- * Example: 0.1.0-rc1-1-g5c86570
+ * Example: 2022.02-1-g5c86570
  */
 extern const char NFD_VERSION_BUILD_STRING[];
 
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index ba4a2a9..231d8ae 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -9,7 +9,7 @@
 
 -  Ubuntu 18.04 (amd64, armhf, i386)
 -  Ubuntu 20.04 (amd64)
--  Ubuntu 21.04 (amd64)
+-  Ubuntu 21.10 (amd64)
 -  macOS 10.15
 -  macOS 11 (Intel only)
 -  CentOS 8
@@ -22,7 +22,6 @@
 -  Fedora >= 29
 -  Gentoo Linux
 -  Raspberry Pi OS (formerly Raspbian) >= 2019-06-20
--  macOS 10.13
 -  macOS 10.14
 
 .. _Install NFD on Ubuntu Linux using the NDN PPA repository:
diff --git a/docs/release-notes-latest.rst b/docs/release-notes-latest.rst
index 7d29971..a24bd0a 120000
--- a/docs/release-notes-latest.rst
+++ b/docs/release-notes-latest.rst
@@ -1 +1 @@
-release-notes/release-notes-0.7.1.rst
\ No newline at end of file
+release-notes/release-notes-22.02.rst
\ No newline at end of file
diff --git a/docs/release-notes/release-notes-22.02.rst b/docs/release-notes/release-notes-22.02.rst
new file mode 100644
index 0000000..f14a900
--- /dev/null
+++ b/docs/release-notes/release-notes-22.02.rst
@@ -0,0 +1,66 @@
+NFD version 22.02
+-----------------
+
+Release date: February 17, 2022
+
+Note that starting with this release, NFD switched to a new versioning convention:
+``YEAR.MONTH[.REVISION]``.
+
+Notable changes and new features
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Remove NACKs from multicast strategy (:issue:`5146`)
+
+- Dispatch pending interests when a new next hop is created in ``MulticastStrategy``
+  (:issue:`4931`)
+
+- Reorder function parameters in Strategy classes to make the API more uniform
+  (:issue:`5173`)
+
+- Add default ``HopLimit`` to Interests when missing (:issue:`5171`)
+
+- Allow batch command processing by ``nfdc`` to accomodate case when ``nfdc`` is used to
+  create multiple faces/routes at once (:issue:`5169`)
+
+- Update ``Interest::ForwardingHint`` format (:issue:`5187`)
+
+- Rename the ASF strategy parameter ``n-silent-timeouts`` to ``max-timeouts``
+
+- Allow setting default UDP face MTU in ``nfd.conf`` (:issue:`5138`)
+
+Improvements and bug fixes
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Execute ``pcap_activate`` as root for Ethernet faces (:issue:`4647`)
+
+- Update the validation examples in ``nfd.conf.sample`` to accept a certificate name in
+  ``KeyLocator`` in addition to a key name (:issue:`5114`)
+
+- Fix and simplify enumeration logic in ``Forwarder::onNewNextHop()``
+
+- Use per-upstream suppression in ASF strategy (:issue:`5140`)
+
+- Use typed name components for (versioned) strategy names (:issue:`5044`)
+
+- Avoid extending the dataset expiration in ``ForwarderStatusManager``
+
+- ``DeadNonceList`` improvements
+
+  * Code cleanup/modernization
+  * Prevent duplicate entries (:issue:`5167`)
+  * Improve logging (:issue:`5165`)
+  * Increase initial and minimum capacity
+
+- Handle error when calling ``remote_endpoint`` on a TCP socket (:issue:`5158`)
+
+- Various build system and documentation extensions and fixes
+
+Removals
+^^^^^^^^
+
+- Eliminate ``Forwarder::dispatchToStrategy()`` (use direct call to
+  ``StrategyChoice::findEffectiveStrategy(PitEntry)``)
+
+- NCC strategy (legacy)
+
+- Best-route strategy version 1 (legacy)
diff --git a/docs/releases.rst b/docs/releases.rst
index e190cb3..bc7c083 100644
--- a/docs/releases.rst
+++ b/docs/releases.rst
@@ -2,29 +2,18 @@
 ++++++++++++
 
 .. toctree::
-   :hidden:
-   :maxdepth: 1
+    :glob:
+    :hidden:
+    :maxdepth: 1
+    :reversed:
 
-   release-notes/release-notes-0.7.1
-   release-notes/release-notes-0.7.0
-   release-notes/release-notes-0.6.6
-   release-notes/release-notes-0.6.5
-   release-notes/release-notes-0.6.4
-   release-notes/release-notes-0.6.3
-   release-notes/release-notes-0.6.2
-   release-notes/release-notes-0.6.1
-   release-notes/release-notes-0.6.0
-   release-notes/release-notes-0.5.1
-   release-notes/release-notes-0.5.0
-   release-notes/release-notes-0.4.1
-   release-notes/release-notes-0.4.0
-   release-notes/release-notes-0.3.4
-   release-notes/release-notes-0.3.3
-   release-notes/release-notes-0.3.2
-   release-notes/release-notes-0.3.1
-   release-notes/release-notes-0.3.0
-   release-notes/release-notes-0.2.0
-   release-notes/release-notes-0.1.0
+    release-notes/*
+
+* **NFD version 22.02**
+  (:doc:`Release Notes <release-notes/release-notes-22.02>`, `Documentation <https://named-data.net/doc/NFD/22.02/>`__)
+
+  `src (git) <https://github.com/named-data/NFD/releases/tag/NFD-22.02>`__,
+  `src (tarball) <https://named-data.net/downloads/nfd-22.02.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nfd-22.02.tar.bz2.sha256>`__)
 
 * **NFD version 0.7.1**
   (:doc:`Release Notes <release-notes/release-notes-0.7.1>`, `Documentation <https://named-data.net/doc/NFD/0.7.1/>`__)
diff --git a/tests/core/version.t.cpp b/tests/core/version.t.cpp
index c2e12fb..1361c89 100644
--- a/tests/core/version.t.cpp
+++ b/tests/core/version.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -27,7 +27,8 @@
 
 #include "tests/test-common.hpp"
 
-#include <stdio.h>
+#include <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/split.hpp>
 
 namespace nfd {
 namespace tests {
@@ -38,9 +39,13 @@
 {
   BOOST_TEST_MESSAGE("NFD_VERSION = " + to_string(NFD_VERSION));
 
-  BOOST_CHECK_EQUAL(NFD_VERSION, NFD_VERSION_MAJOR * 1000000 +
-                                 NFD_VERSION_MINOR * 1000 +
-                                 NFD_VERSION_PATCH);
+  BOOST_TEST(NFD_VERSION, NFD_VERSION_MAJOR * 1000000 +
+                          NFD_VERSION_MINOR * 1000 +
+                          NFD_VERSION_PATCH);
+
+  static_assert(NFD_VERSION_MAJOR >= 22 && NFD_VERSION_MAJOR <= 100, "");
+  static_assert(NFD_VERSION_MINOR >= 1 && NFD_VERSION_MINOR <= 12, "");
+  static_assert(NFD_VERSION_PATCH < 1000, "");
 }
 
 BOOST_AUTO_TEST_CASE(VersionString)
@@ -48,13 +53,16 @@
   BOOST_TEST_MESSAGE("NFD_VERSION_STRING = " << NFD_VERSION_STRING);
   BOOST_TEST_MESSAGE("NFD_VERSION_BUILD_STRING = " << NFD_VERSION_BUILD_STRING);
 
-  static_assert(NFD_VERSION_MAJOR < 1000, "");
-  static_assert(NFD_VERSION_MINOR < 1000, "");
-  static_assert(NFD_VERSION_PATCH < 1000, "");
-  char buf[12];
-  ::snprintf(buf, sizeof(buf), "%d.%d.%d", NFD_VERSION_MAJOR, NFD_VERSION_MINOR, NFD_VERSION_PATCH);
+  std::vector<std::string> v;
+  std::string s(NFD_VERSION_STRING);
+  boost::split(v, s, boost::is_any_of("."));
+  BOOST_TEST_REQUIRE(v.size() >= 2);
+  BOOST_TEST_REQUIRE(v.size() <= 3);
 
-  BOOST_CHECK_EQUAL(NFD_VERSION_STRING, buf);
+  BOOST_TEST(std::stoi(v[0]) == NFD_VERSION_MAJOR);
+  BOOST_TEST(std::stoi(v[1]) == NFD_VERSION_MINOR);
+  int patch = v.size() == 3 ? std::stoi(v[2]) : 0;
+  BOOST_TEST(patch == NFD_VERSION_PATCH);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestVersion
diff --git a/wscript b/wscript
index b55ed4a..311abd0 100644
--- a/wscript
+++ b/wscript
@@ -1,6 +1,6 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 """
-Copyright (c) 2014-2021,  Regents of the University of California,
+Copyright (c) 2014-2022,  Regents of the University of California,
                           Arizona Board of Regents,
                           Colorado State University,
                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 from waflib import Context, Logs, Utils
 import os, subprocess
 
-VERSION = '0.7.1'
+VERSION = '22.02'
 APPNAME = 'nfd'
 BUGREPORT = 'https://redmine.named-data.net/projects/nfd'
 URL = 'https://named-data.net/doc/NFD/'
@@ -239,17 +239,19 @@
 def versionhpp(bld):
     version(bld)
 
+    vmajor = int(VERSION_SPLIT[0])
+    vminor = int(VERSION_SPLIT[1]) if len(VERSION_SPLIT) >= 2 else 0
+    vpatch = int(VERSION_SPLIT[2]) if len(VERSION_SPLIT) >= 3 else 0
+
     bld(features='subst',
         name='version.hpp',
         source='core/version.hpp.in',
         target='core/version.hpp',
         install_path=None,
-        VERSION=int(VERSION_SPLIT[0]) * 1000000 +
-                int(VERSION_SPLIT[1]) * 1000 +
-                int(VERSION_SPLIT[2]),
-        VERSION_MAJOR=VERSION_SPLIT[0],
-        VERSION_MINOR=VERSION_SPLIT[1],
-        VERSION_PATCH=VERSION_SPLIT[2])
+        VERSION=vmajor * 1000000 + vminor * 1000 + vpatch,
+        VERSION_MAJOR=str(vmajor),
+        VERSION_MINOR=str(vminor),
+        VERSION_PATCH=str(vpatch))
 
 def docs(bld):
     from waflib import Options