transport: change default NFD Unix socket path

Refs: #5304
Change-Id: Ice56dd716abd808896e5cd7609398e26c15ffa3a
diff --git a/client.conf.sample b/client.conf.sample
index b1debc8..453a8ed 100644
--- a/client.conf.sample
+++ b/client.conf.sample
@@ -1,27 +1,28 @@
-; "transport" specifies Face's default transport connection.
-; The value can be a "unix:" or "tcp4:" Face URI.
+; "transport" specifies the default transport connection used by the client-side face to communicate
+; with a (local or remote) NDN forwarder. The value must be a Face URI with a Unix or TCP scheme.
 ;
 ; For example:
-;   unix:///var/run/nfd.sock
+;   unix:///tmp/nfd/nfd.sock
 ;   tcp://192.0.2.1
 ;   tcp4://example.com:6363
+;   tcp6://[2001:db8::1]:6363
 ;
-; The default value of this field is platform-dependent, being unix:///run/nfd.sock on Linux and
-; unix:///var/run/nfd.sock on other platforms.
+; The default value of this field is platform-dependent, being "unix:///run/nfd/nfd.sock" on Linux
+; and "unix:///var/run/nfd/nfd.sock" on other platforms.
 ;
-;transport=unix:///var/run/nfd.sock
+;transport=unix:///var/run/nfd/nfd.sock
 
-; "pib" determines which Public Info Base (PIB) should used by default in applications.
+; "pib" determines which Public Information Base (PIB) should used by default in applications.
 ; If "pib" is not specified, a platform-dependent default will be used.
 ; If "pib" is specified, it may have a value of:
-;   pib-sqlite3
+;   - "pib-sqlite3"
 ;
 ;pib=pib-sqlite3
 
 ; "tpm" determines which Trusted Platform Module (TPM) should used by default in applications.
 ; If "tpm" is not specified, a platform-dependent default will be used.
 ; If "tpm" is specified, it may have a value of:
-;   tpm-osxkeychain (default on macOS)
-;   tpm-file (default in operating systems other than macOS)
+;   - "tpm-osxkeychain"  (default on macOS)
+;   - "tpm-file"         (default on all other platforms)
 ;
 ;tpm=tpm-file
diff --git a/docs/conf.py b/docs/conf.py
index fc4ee3a..8ea637a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -10,7 +10,7 @@
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
 
 project = 'ndn-cxx: NDN C++ library with eXperimental eXtensions'
-copyright = 'Copyright © 2013-2023 Regents of the University of California.'
+copyright = 'Copyright © 2013-2024 Regents of the University of California.'
 author = 'Named Data Networking Project'
 
 # The short X.Y version.
diff --git a/docs/manpages/ndn-client.conf.rst b/docs/manpages/ndn-client.conf.rst
index 010498d..832610c 100644
--- a/docs/manpages/ndn-client.conf.rst
+++ b/docs/manpages/ndn-client.conf.rst
@@ -23,11 +23,11 @@
 ---------
 
 transport
-  FaceUri for default connection toward local NDN forwarder.  Only ``unix``, ``tcp``, ``tcp4``, and
-  ``tcp6`` FaceUris can be specified here.
+  FaceUri for default connection toward local or remote NDN forwarder.  Only ``unix``, ``tcp``,
+  ``tcp4``, and ``tcp6`` FaceUris are accepted.
 
-  By default, ``unix:///run/nfd.sock`` is used on Linux and ``unix:///var/run/nfd.sock`` is used on
-  other platforms.
+  By default, ``unix:///run/nfd/nfd.sock`` is used on Linux and ``unix:///var/run/nfd/nfd.sock``
+  is used on other platforms.
 
   .. note::
     This value can be overridden using the ``NDN_CLIENT_TRANSPORT`` environment variable.
diff --git a/ndn-cxx/transport/unix-transport.cpp b/ndn-cxx/transport/unix-transport.cpp
index b74ee00..970a955 100644
--- a/ndn-cxx/transport/unix-transport.cpp
+++ b/ndn-cxx/transport/unix-transport.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -59,9 +59,9 @@
   // Otherwise, use the default nfd.sock location.
   return
 #ifdef __linux__
-    "/run/nfd.sock";
+    "/run/nfd/nfd.sock";
 #else
-    "/var/run/nfd.sock";
+    "/var/run/nfd/nfd.sock";
 #endif // __linux__
 }
 
diff --git a/tests/unit/net/face-uri.t.cpp b/tests/unit/net/face-uri.t.cpp
index 36883bf..170e498 100644
--- a/tests/unit/net/face-uri.t.cpp
+++ b/tests/unit/net/face-uri.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California,
+ * Copyright (c) 2013-2024 Regents of the University of California,
  *                         Arizona Board of Regents,
  *                         Colorado State University,
  *                         University Pierre & Marie Curie, Sorbonne University,
@@ -582,12 +582,12 @@
 
   BOOST_CHECK_EQUAL(FaceUri("internal://").isCanonical(), false);
   BOOST_CHECK_EQUAL(FaceUri("null://").isCanonical(), false);
-  BOOST_CHECK_EQUAL(FaceUri("unix:///var/run/nfd.sock").isCanonical(), false);
+  BOOST_CHECK_EQUAL(FaceUri("unix:///run/nfd/nfd.sock").isCanonical(), false);
   BOOST_CHECK_EQUAL(FaceUri("fd://0").isCanonical(), false);
 
   runTest("internal://", false);
   runTest("null://", false);
-  runTest("unix:///var/run/nfd.sock", false);
+  runTest("unix:///run/nfd/nfd.sock", false);
   runTest("fd://0", false);
 }
 
@@ -608,7 +608,7 @@
   FaceUri uri0("udp://[::1]:6363");
   FaceUri uri1("tcp://[::1]:6363");
   FaceUri uri2("tcp://127.0.0.1:6363");
-  FaceUri uri3("unix:///run/ndn/nfd.sock");
+  FaceUri uri3("unix:///run/nfd/nfd.sock");
 
   BOOST_CHECK_EQUAL(uri0, uri0);
   BOOST_CHECK_LE(uri0, uri0);
diff --git a/tests/unit/transport/unix-transport.t.cpp b/tests/unit/transport/unix-transport.t.cpp
index f7c54d6..526fdff 100644
--- a/tests/unit/transport/unix-transport.t.cpp
+++ b/tests/unit/transport/unix-transport.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -34,9 +34,9 @@
 {
   BOOST_CHECK_EQUAL(UnixTransport::getSocketNameFromUri("unix:///tmp/test/nfd.sock"), "/tmp/test/nfd.sock");
 #ifdef __linux__
-  BOOST_CHECK_EQUAL(UnixTransport::getSocketNameFromUri(""), "/run/nfd.sock");
+  BOOST_CHECK_EQUAL(UnixTransport::getSocketNameFromUri(""), "/run/nfd/nfd.sock");
 #else
-  BOOST_CHECK_EQUAL(UnixTransport::getSocketNameFromUri(""), "/var/run/nfd.sock");
+  BOOST_CHECK_EQUAL(UnixTransport::getSocketNameFromUri(""), "/var/run/nfd/nfd.sock");
 #endif // __linux__
   BOOST_CHECK_EXCEPTION(UnixTransport::getSocketNameFromUri("tcp://"),
                         Transport::Error,