diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index 7798cc8..e0e2f58 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -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,
@@ -46,7 +46,7 @@
 class DatagramTransport : public Transport
 {
 public:
-  typedef Protocol protocol;
+  using protocol = Protocol;
 
   /** \brief Construct datagram transport.
    *
@@ -58,11 +58,11 @@
   ssize_t
   getSendQueueLength() override;
 
-  /** \brief Receive datagram, translate buffer into packet, deliver to parent class.
+  /**
+   * \brief Receive datagram, translate buffer into packet, deliver to parent class.
    */
   void
-  receiveDatagram(const uint8_t* buffer, size_t nBytesReceived,
-                  const boost::system::error_code& error);
+  receiveDatagram(span<const uint8_t> buffer, const boost::system::error_code& error);
 
 protected:
   void
@@ -170,23 +170,23 @@
 
 template<class T, class U>
 void
-DatagramTransport<T, U>::receiveDatagram(const uint8_t* buffer, size_t nBytesReceived,
+DatagramTransport<T, U>::receiveDatagram(span<const uint8_t> buffer,
                                          const boost::system::error_code& error)
 {
   if (error)
     return processErrorCode(error);
 
-  NFD_LOG_FACE_TRACE("Received: " << nBytesReceived << " bytes from " << m_sender);
+  NFD_LOG_FACE_TRACE("Received: " << buffer.size() << " bytes from " << m_sender);
 
   bool isOk = false;
   Block element;
-  std::tie(isOk, element) = Block::fromBuffer(buffer, nBytesReceived);
+  std::tie(isOk, element) = Block::fromBuffer(buffer);
   if (!isOk) {
     NFD_LOG_FACE_WARN("Failed to parse incoming packet from " << m_sender);
     // This packet won't extend the face lifetime
     return;
   }
-  if (element.size() != nBytesReceived) {
+  if (element.size() != buffer.size()) {
     NFD_LOG_FACE_WARN("Received datagram size and decoded element size don't match");
     // This packet won't extend the face lifetime
     return;
@@ -200,7 +200,7 @@
 void
 DatagramTransport<T, U>::handleReceive(const boost::system::error_code& error, size_t nBytesReceived)
 {
-  receiveDatagram(m_receiveBuffer.data(), nBytesReceived, error);
+  receiveDatagram(ndn::make_span(m_receiveBuffer).first(nBytesReceived), error);
 
   if (m_socket.is_open())
     m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_sender,
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index 512d078..5f3f295 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.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,
@@ -120,26 +120,24 @@
     return;
   }
 
-  const uint8_t* pkt;
-  size_t len;
+  span<const uint8_t> pkt;
   std::string err;
-  std::tie(pkt, len, err) = m_pcap.readNextPacket();
+  std::tie(pkt, err) = m_pcap.readNextPacket();
 
-  if (pkt == nullptr) {
+  if (pkt.empty()) {
     NFD_LOG_CHAN_WARN("Read error: " << err);
   }
   else {
     const ether_header* eh;
-    std::tie(eh, err) = ethernet::checkFrameHeader(pkt, len, m_localEndpoint->getEthernetAddress(),
+    std::tie(eh, err) = ethernet::checkFrameHeader(pkt, m_localEndpoint->getEthernetAddress(),
                                                    m_localEndpoint->getEthernetAddress());
     if (eh == nullptr) {
       NFD_LOG_CHAN_DEBUG(err);
     }
     else {
       ethernet::Address sender(eh->ether_shost);
-      pkt += ethernet::HDR_LEN;
-      len -= ethernet::HDR_LEN;
-      processIncomingPacket(pkt, len, sender, onFaceCreated, onReceiveFailed);
+      pkt = pkt.subspan(ethernet::HDR_LEN);
+      processIncomingPacket(pkt, sender, onFaceCreated, onReceiveFailed);
     }
   }
 
@@ -154,7 +152,7 @@
 }
 
 void
-EthernetChannel::processIncomingPacket(const uint8_t* packet, size_t length,
+EthernetChannel::processIncomingPacket(span<const uint8_t> packet,
                                        const ethernet::Address& sender,
                                        const FaceCreatedCallback& onFaceCreated,
                                        const FaceCreationFailedCallback& onReceiveFailed)
@@ -182,7 +180,7 @@
 
   // dispatch the packet to the face for processing
   auto* transport = static_cast<UnicastEthernetTransport*>(face->getTransport());
-  transport->receivePayload(packet, length, sender);
+  transport->receivePayload(packet, sender);
 }
 
 std::pair<bool, shared_ptr<Face>>
diff --git a/daemon/face/ethernet-channel.hpp b/daemon/face/ethernet-channel.hpp
index 7e7fa87..510b7aa 100644
--- a/daemon/face/ethernet-channel.hpp
+++ b/daemon/face/ethernet-channel.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -111,7 +111,7 @@
              const FaceCreationFailedCallback& onReceiveFailed);
 
   void
-  processIncomingPacket(const uint8_t* packet, size_t length,
+  processIncomingPacket(span<const uint8_t> packet,
                         const ethernet::Address& sender,
                         const FaceCreatedCallback& onFaceCreated,
                         const FaceCreationFailedCallback& onReceiveFailed);
diff --git a/daemon/face/ethernet-protocol.cpp b/daemon/face/ethernet-protocol.cpp
index e5e9a69..0a0ebe1 100644
--- a/daemon/face/ethernet-protocol.cpp
+++ b/daemon/face/ethernet-protocol.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  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,
@@ -30,14 +30,13 @@
 namespace nfd {
 namespace ethernet {
 
-std::pair<const ether_header*, std::string>
-checkFrameHeader(const uint8_t* packet, size_t length,
-                 const Address& localAddr, const Address& destAddr)
+std::tuple<const ether_header*, std::string>
+checkFrameHeader(span<const uint8_t> packet, const Address& localAddr, const Address& destAddr)
 {
-  if (length < HDR_LEN + MIN_DATA_LEN)
-    return {nullptr, "Received frame too short: " + to_string(length) + " bytes"};
+  if (packet.size() < HDR_LEN + MIN_DATA_LEN)
+    return {nullptr, "Received frame too short: " + to_string(packet.size()) + " bytes"};
 
-  const ether_header* eh = reinterpret_cast<const ether_header*>(packet);
+  const ether_header* eh = reinterpret_cast<const ether_header*>(packet.data());
 
   // in some cases VLAN-tagged frames may survive the BPF filter,
   // make sure we do not process those frames (see #3348)
diff --git a/daemon/face/ethernet-protocol.hpp b/daemon/face/ethernet-protocol.hpp
index 639c678..c9b9bdc 100644
--- a/daemon/face/ethernet-protocol.hpp
+++ b/daemon/face/ethernet-protocol.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  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,6 +27,7 @@
 #define NFD_DAEMON_FACE_ETHERNET_PROTOCOL_HPP
 
 #include "core/common.hpp"
+
 #include <ndn-cxx/net/ethernet.hpp>
 #include <net/ethernet.h>
 
@@ -35,9 +36,8 @@
 
 using namespace ndn::ethernet;
 
-std::pair<const ether_header*, std::string>
-checkFrameHeader(const uint8_t* packet, size_t length,
-                 const Address& localAddr, const Address& destAddr);
+std::tuple<const ether_header*, std::string>
+checkFrameHeader(span<const uint8_t> packet, const Address& localAddr, const Address& destAddr);
 
 } // namespace ethernet
 } // namespace nfd
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index e98a9a7..7aac95a 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.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,
@@ -125,17 +125,17 @@
   // pad with zeroes if the payload is too short
   if (block.size() < ethernet::MIN_DATA_LEN) {
     static const uint8_t padding[ethernet::MIN_DATA_LEN] = {};
-    buffer.appendByteArray(padding, ethernet::MIN_DATA_LEN - block.size());
+    buffer.appendBytes(ndn::make_span(padding).subspan(block.size()));
   }
 
   // construct and prepend the ethernet header
   uint16_t ethertype = boost::endian::native_to_big(ethernet::ETHERTYPE_NDN);
-  buffer.prependByteArray(reinterpret_cast<const uint8_t*>(&ethertype), ethernet::TYPE_LEN);
-  buffer.prependByteArray(m_srcAddress.data(), m_srcAddress.size());
-  buffer.prependByteArray(m_destAddress.data(), m_destAddress.size());
+  buffer.prependBytes({reinterpret_cast<const uint8_t*>(&ethertype), ethernet::TYPE_LEN});
+  buffer.prependBytes(m_srcAddress);
+  buffer.prependBytes(m_destAddress);
 
   // send the frame
-  int sent = pcap_inject(m_pcap, buffer.buf(), buffer.size());
+  int sent = pcap_inject(m_pcap, buffer.data(), buffer.size());
   if (sent < 0)
     handleError("Send operation failed: " + m_pcap.getLastError());
   else if (static_cast<size_t>(sent) < buffer.size())
@@ -168,26 +168,24 @@
     return;
   }
 
-  const uint8_t* pkt;
-  size_t len;
+  span<const uint8_t> pkt;
   std::string err;
-  std::tie(pkt, len, err) = m_pcap.readNextPacket();
+  std::tie(pkt, err) = m_pcap.readNextPacket();
 
-  if (pkt == nullptr) {
+  if (pkt.empty()) {
     NFD_LOG_FACE_WARN("Read error: " << err);
   }
   else {
     const ether_header* eh;
-    std::tie(eh, err) = ethernet::checkFrameHeader(pkt, len, m_srcAddress,
+    std::tie(eh, err) = ethernet::checkFrameHeader(pkt, m_srcAddress,
                                                    m_destAddress.isMulticast() ? m_destAddress : m_srcAddress);
     if (eh == nullptr) {
       NFD_LOG_FACE_WARN(err);
     }
     else {
       ethernet::Address sender(eh->ether_shost);
-      pkt += ethernet::HDR_LEN;
-      len -= ethernet::HDR_LEN;
-      receivePayload(pkt, len, sender);
+      pkt = pkt.subspan(ethernet::HDR_LEN);
+      receivePayload(pkt, sender);
     }
   }
 
@@ -202,14 +200,13 @@
 }
 
 void
-EthernetTransport::receivePayload(const uint8_t* payload, size_t length,
-                                  const ethernet::Address& sender)
+EthernetTransport::receivePayload(span<const uint8_t> payload, const ethernet::Address& sender)
 {
-  NFD_LOG_FACE_TRACE("Received: " << length << " bytes from " << sender);
+  NFD_LOG_FACE_TRACE("Received: " << payload.size() << " bytes from " << sender);
 
   bool isOk = false;
   Block element;
-  std::tie(isOk, element) = Block::fromBuffer(payload, length);
+  std::tie(isOk, element) = Block::fromBuffer(payload);
   if (!isOk) {
     NFD_LOG_FACE_WARN("Failed to parse incoming packet from " << sender);
     // This packet won't extend the face lifetime
diff --git a/daemon/face/ethernet-transport.hpp b/daemon/face/ethernet-transport.hpp
index 8c929d1..1379899 100644
--- a/daemon/face/ethernet-transport.hpp
+++ b/daemon/face/ethernet-transport.hpp
@@ -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,
@@ -49,13 +49,11 @@
 
   /**
    * @brief Processes the payload of an incoming frame
-   * @param payload Pointer to the first byte of data after the Ethernet header
-   * @param length Payload length
+   * @param payload Payload bytes, starting from the first byte after the Ethernet header
    * @param sender Sender address
    */
   void
-  receivePayload(const uint8_t* payload, size_t length,
-                 const ethernet::Address& sender);
+  receivePayload(span<const uint8_t> payload, const ethernet::Address& sender);
 
 protected:
   EthernetTransport(const ndn::net::NetworkInterface& localEndpoint,
diff --git a/daemon/face/lp-reassembler.cpp b/daemon/face/lp-reassembler.cpp
index d19f799..77a7120 100644
--- a/daemon/face/lp-reassembler.cpp
+++ b/daemon/face/lp-reassembler.cpp
@@ -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,
@@ -69,10 +69,9 @@
 
   // check for fast path
   if (fragIndex == 0 && fragCount == 1) {
-    ndn::Buffer::const_iterator fragBegin, fragEnd;
-    std::tie(fragBegin, fragEnd) = packet.get<lp::FragmentField>();
-    Block netPkt(&*fragBegin, std::distance(fragBegin, fragEnd));
-    return std::make_tuple(true, netPkt, packet);
+    auto frag = packet.get<lp::FragmentField>();
+    Block netPkt({frag.first, frag.second});
+    return {true, netPkt, packet};
   }
 
   // check Sequence and compute message identifier
@@ -140,7 +139,7 @@
     it = std::copy(fragBegin, fragEnd, it);
   }
 
-  return Block(&*(fragBuffer.cbegin()), std::distance(fragBuffer.cbegin(), fragBuffer.cend()));
+  return Block(fragBuffer);
 }
 
 void
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index f387add..95849b1 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.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,
@@ -174,7 +174,7 @@
       // Check for recent received Sequences to remove
       auto now = time::steady_clock::now();
       auto rto = m_rttEst.getEstimatedRto();
-      while (m_recentRecvSeqsQueue.size() > 0 &&
+      while (!m_recentRecvSeqsQueue.empty() &&
              now > m_recentRecvSeqs[m_recentRecvSeqsQueue.front()] + rto) {
         m_recentRecvSeqs.erase(m_recentRecvSeqsQueue.front());
         m_recentRecvSeqsQueue.pop();
@@ -226,7 +226,7 @@
 {
   lp::Sequence txSeq = ++m_lastTxSeqNo;
   frag.set<lp::TxSequenceField>(txSeq);
-  if (m_unackedFrags.size() > 0 && m_lastTxSeqNo == m_firstUnackedFrag->first) {
+  if (!m_unackedFrags.empty() && m_lastTxSeqNo == m_firstUnackedFrag->first) {
     NDN_THROW(std::length_error("TxSequence range exceeded"));
   }
   return m_lastTxSeqNo;
@@ -310,10 +310,8 @@
     // Notify strategy of dropped Interest (if any)
     if (netPkt->isInterest) {
       BOOST_ASSERT(netPkt->pkt.has<lp::FragmentField>());
-      ndn::Buffer::const_iterator fragBegin, fragEnd;
-      std::tie(fragBegin, fragEnd) = netPkt->pkt.get<lp::FragmentField>();
-      Block frag(&*fragBegin, std::distance(fragBegin, fragEnd));
-      onDroppedInterest(Interest(frag));
+      auto frag = netPkt->pkt.get<lp::FragmentField>();
+      onDroppedInterest(Interest(Block({frag.first, frag.second})));
     }
 
     // Delete this LpPacket from m_unackedFrags
diff --git a/daemon/face/pcap-helper.cpp b/daemon/face/pcap-helper.cpp
index b7873fe..d481ac5 100644
--- a/daemon/face/pcap-helper.cpp
+++ b/daemon/face/pcap-helper.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -79,7 +79,7 @@
 }
 
 void
-PcapHelper::close()
+PcapHelper::close() noexcept
 {
   if (m_pcap) {
     pcap_close(m_pcap);
@@ -100,7 +100,7 @@
 }
 
 std::string
-PcapHelper::getLastError() const
+PcapHelper::getLastError() const noexcept
 {
   return pcap_geterr(m_pcap);
 }
@@ -128,19 +128,19 @@
     NDN_THROW(Error("pcap_setfilter: " + getLastError()));
 }
 
-std::tuple<const uint8_t*, size_t, std::string>
-PcapHelper::readNextPacket() const
+std::tuple<span<const uint8_t>, std::string>
+PcapHelper::readNextPacket() const noexcept
 {
   pcap_pkthdr* header;
   const uint8_t* packet;
 
   int ret = pcap_next_ex(m_pcap, &header, &packet);
   if (ret < 0)
-    return std::make_tuple(nullptr, 0, getLastError());
+    return {span<uint8_t>{}, getLastError()};
   else if (ret == 0)
-    return std::make_tuple(nullptr, 0, "timed out");
+    return {span<uint8_t>{}, "timed out"};
   else
-    return std::make_tuple(packet, header->caplen, "");
+    return {{packet, header->caplen}, ""};
 }
 
 } // namespace face
diff --git a/daemon/face/pcap-helper.hpp b/daemon/face/pcap-helper.hpp
index 1f08d85..30a8deb 100644
--- a/daemon/face/pcap-helper.hpp
+++ b/daemon/face/pcap-helper.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -79,7 +79,7 @@
    * @sa pcap_close(3pcap)
    */
   void
-  close();
+  close() noexcept;
 
   /**
    * @brief Obtain a file descriptor that can be used in calls such as select(2) and poll(2).
@@ -98,7 +98,7 @@
    * @sa pcap_geterr(3pcap)
    */
   std::string
-  getLastError() const;
+  getLastError() const noexcept;
 
   /**
    * @brief Get the number of packets dropped by the kernel, as reported by libpcap.
@@ -120,18 +120,17 @@
 
   /**
    * @brief Read the next packet captured on the interface.
-   * @return If successful, returns a tuple containing a pointer to the received packet
-   *         (including the link-layer header) and the size of the packet; the third
-   *         element must be ignored. On failure, returns a tuple containing nullptr,
-   *         0, and the reason for the failure.
-   * @warning The returned pointer must not be freed by the caller, and is valid only
-   *          until the next call to this function.
+   * @return If successful, returns a tuple containing a read-only view of the received
+   *         packet bytes (including the link-layer header) and a second element that
+   *         must be ignored. On failure, returns a tuple containing an empty span and
+   *         the reason for the failure.
+   * @warning The returned span is valid only until the next call to this function.
    * @sa pcap_next_ex(3pcap)
    */
-  std::tuple<const uint8_t*, size_t, std::string>
-  readNextPacket() const;
+  std::tuple<span<const uint8_t>, std::string>
+  readNextPacket() const noexcept;
 
-  operator pcap_t*() const
+  operator pcap_t*() const noexcept
   {
     return m_pcap;
   }
diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp
index a6fcb74..c4ae849 100644
--- a/daemon/face/stream-transport.hpp
+++ b/daemon/face/stream-transport.hpp
@@ -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,
@@ -43,7 +43,7 @@
 class StreamTransport : public Transport
 {
 public:
-  typedef Protocol protocol;
+  using protocol = Protocol;
 
   /** \brief Construct stream transport.
    *
@@ -244,16 +244,17 @@
   NFD_LOG_FACE_TRACE("Received: " << nBytesReceived << " bytes");
 
   m_receiveBufferSize += nBytesReceived;
+  auto bufferView = ndn::make_span(m_receiveBuffer, m_receiveBufferSize);
   size_t offset = 0;
   bool isOk = true;
-  while (m_receiveBufferSize - offset > 0) {
+  while (offset < bufferView.size()) {
     Block element;
-    std::tie(isOk, element) = Block::fromBuffer(m_receiveBuffer + offset, m_receiveBufferSize - offset);
+    std::tie(isOk, element) = Block::fromBuffer(bufferView.subspan(offset));
     if (!isOk)
       break;
 
     offset += element.size();
-    BOOST_ASSERT(offset <= m_receiveBufferSize);
+    BOOST_ASSERT(offset <= bufferView.size());
 
     this->receive(element);
   }
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index a5d9dee..bb836d2 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -141,7 +141,7 @@
 
   // dispatch the datagram to the face for processing
   auto* transport = static_cast<UnicastUdpTransport*>(face->getTransport());
-  transport->receiveDatagram(m_receiveBuffer.data(), nBytesReceived, error);
+  transport->receiveDatagram(ndn::make_span(m_receiveBuffer).first(nBytesReceived), error);
 
   waitForNewPeer(onFaceCreated, onReceiveFailed);
 }
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index 3ac0023..33ae643 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.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,
@@ -98,7 +98,7 @@
 
   bool isOk = false;
   Block element;
-  std::tie(isOk, element) = Block::fromBuffer(reinterpret_cast<const uint8_t*>(msg.data()), msg.size());
+  std::tie(isOk, element) = Block::fromBuffer({reinterpret_cast<const uint8_t*>(msg.data()), msg.size()});
   if (!isOk) {
     NFD_LOG_FACE_WARN("Failed to parse message payload");
     return;
diff --git a/tests/daemon/face/datagram-transport.t.cpp b/tests/daemon/face/datagram-transport.t.cpp
index 28b73e1..6d41a1f 100644
--- a/tests/daemon/face/datagram-transport.t.cpp
+++ b/tests/daemon/face/datagram-transport.t.cpp
@@ -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,
@@ -120,12 +120,12 @@
 {
   TRANSPORT_TEST_INIT();
 
-  std::vector<uint8_t> bytes(ndn::MAX_NDN_PACKET_SIZE, 0);
-  auto pkt1 = ndn::encoding::makeBinaryBlock(300, bytes.data(), bytes.size() - 6);
+  const std::vector<uint8_t> bytes(ndn::MAX_NDN_PACKET_SIZE, 0);
+  auto pkt1 = ndn::encoding::makeBinaryBlock(300, ndn::make_span(bytes).subspan(6));
   ndn::Buffer buf1(pkt1.begin(), pkt1.end());
   BOOST_REQUIRE_EQUAL(buf1.size(), ndn::MAX_NDN_PACKET_SIZE);
 
-  auto pkt2 = ndn::encoding::makeBinaryBlock(301, bytes.data(), bytes.size());
+  auto pkt2 = ndn::encoding::makeBinaryBlock(301, bytes);
   ndn::Buffer buf2(pkt2.begin(), pkt2.end());
   BOOST_REQUIRE_GT(buf2.size(), ndn::MAX_NDN_PACKET_SIZE);
 
diff --git a/tests/daemon/face/stream-transport.t.cpp b/tests/daemon/face/stream-transport.t.cpp
index 2a1d554..c8fa82b 100644
--- a/tests/daemon/face/stream-transport.t.cpp
+++ b/tests/daemon/face/stream-transport.t.cpp
@@ -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,
@@ -141,12 +141,12 @@
 {
   TRANSPORT_TEST_INIT();
 
-  std::vector<uint8_t> bytes(ndn::MAX_NDN_PACKET_SIZE, 0);
-  auto pkt1 = ndn::encoding::makeBinaryBlock(300, bytes.data(), bytes.size() - 6);
+  const std::vector<uint8_t> bytes(ndn::MAX_NDN_PACKET_SIZE, 0);
+  auto pkt1 = ndn::encoding::makeBinaryBlock(300, ndn::make_span(bytes).subspan(6));
   ndn::Buffer buf1(pkt1.begin(), pkt1.end());
   BOOST_REQUIRE_EQUAL(buf1.size(), ndn::MAX_NDN_PACKET_SIZE);
 
-  auto pkt2 = ndn::encoding::makeBinaryBlock(301, bytes.data(), bytes.size());
+  auto pkt2 = ndn::encoding::makeBinaryBlock(301, bytes);
   ndn::Buffer buf2(pkt2.begin(), pkt2.end());
   BOOST_REQUIRE_GT(buf2.size(), ndn::MAX_NDN_PACKET_SIZE);
 
diff --git a/tests/daemon/mgmt/command-authenticator.t.cpp b/tests/daemon/mgmt/command-authenticator.t.cpp
index 4415b11..c52c81b 100644
--- a/tests/daemon/mgmt/command-authenticator.t.cpp
+++ b/tests/daemon/mgmt/command-authenticator.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,
@@ -309,7 +309,8 @@
   BOOST_CHECK_EQUAL(authorize1(
     [] (Interest& interest) {
       ndn::KeyLocator kl;
-      kl.setKeyDigest(ndn::encoding::makeBinaryBlock(tlv::KeyDigest, "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD", 8));
+      kl.setKeyDigest(ndn::makeBinaryBlock(tlv::KeyDigest,
+                                           {0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD}));
       ndn::SignatureInfo sigInfo(tlv::SignatureSha256WithRsa);
       sigInfo.setKeyLocator(kl);
       setNameComponent(interest, ndn::signed_interest::POS_SIG_INFO,
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index 439c220..0e43944 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.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,
@@ -217,15 +217,17 @@
   auto face3 = addFace(REMOVE_LAST_NOTIFICATION | SET_URI_TEST); // test://
 
   auto generateQuery = [] (const FaceQueryFilter& filter) {
-    return Interest(Name("/localhost/nfd/faces/query").append(filter.wireEncode()))
+    return Interest(Name("/localhost/nfd/faces/query")
+                    .append(filter.wireEncode().begin(), filter.wireEncode().end()))
            .setCanBePrefix(true);
   };
 
   auto schemeQuery = generateQuery(FaceQueryFilter().setUriScheme("dummy"));
   auto idQuery = generateQuery(FaceQueryFilter().setFaceId(face1->getId()));
   auto scopeQuery = generateQuery(FaceQueryFilter().setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL));
+  auto invalidContent = ndn::makeStringBlock(tlv::Content, "invalid");
   auto invalidQueryName = Name("/localhost/nfd/faces/query")
-                          .append(ndn::makeStringBlock(tlv::Content, "invalid"));
+                          .append(invalidContent.begin(), invalidContent.end());
   auto invalidQuery = Interest(invalidQueryName).setCanBePrefix(true);
 
   receiveInterest(schemeQuery); // face1 and face2 expected
diff --git a/tests/daemon/mgmt/manager-base.t.cpp b/tests/daemon/mgmt/manager-base.t.cpp
index 315bf28..8b57258 100644
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ b/tests/daemon/mgmt/manager-base.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -123,8 +123,7 @@
   auto post = m_manager.registerNotificationStream("test-notification");
   setTopPrefix();
 
-  const uint8_t buf[] = {0x82, 0x01, 0x02};
-  post(Block(buf, sizeof(buf)));
+  post(Block({0x82, 0x01, 0x02}));
   advanceClocks(1_ms);
 
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
diff --git a/tests/daemon/table/cs-fixture.hpp b/tests/daemon/table/cs-fixture.hpp
index 9819653..0dced9c 100644
--- a/tests/daemon/table/cs-fixture.hpp
+++ b/tests/daemon/table/cs-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -49,7 +49,7 @@
          bool isUnsolicited = false)
   {
     auto data = makeData(name);
-    data->setContent(reinterpret_cast<const uint8_t*>(&id), sizeof(id));
+    data->setContent(ndn::make_span(reinterpret_cast<const uint8_t*>(&id), sizeof(id)));
 
     if (modifyData != nullptr) {
       modifyData(*data);
diff --git a/tests/key-chain-fixture.cpp b/tests/key-chain-fixture.cpp
index c71f175..faca165 100644
--- a/tests/key-chain-fixture.cpp
+++ b/tests/key-chain-fixture.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,
@@ -60,7 +60,7 @@
   cert.setFreshnessPeriod(1_h);
 
   // set content
-  cert.setContent(key.getPublicKey().data(), key.getPublicKey().size());
+  cert.setContent(key.getPublicKey());
 
   // set signature info
   ndn::SignatureInfo info;
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index 6798dd8..82ab19a 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -105,7 +105,7 @@
   void
   sendEmptyDataset(const Name& prefix)
   {
-    this->sendDatasetReply(prefix, nullptr, 0);
+    this->sendDatasetReply(prefix, span<uint8_t>{});
   }
 
   /** \brief send one WireEncodable in reply to StatusDataset request
@@ -141,7 +141,7 @@
     payload2.wireEncode(buffer);
     payload1.wireEncode(buffer);
 
-    this->sendDatasetReply(prefix, buffer.buf(), buffer.size());
+    this->sendDatasetReply(prefix, buffer);
   }
 
 private:
diff --git a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
index 0834bf5..9a0f5ac 100644
--- a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
+++ b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
@@ -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,
@@ -98,10 +98,9 @@
     }
 
     if (interest.getName() == "/localhop/ndn-autoconf/hub") {
-      const char FACEURI[] = "udp://router.example.net";
       auto data = makeData(Name("/localhop/ndn-autoconf/hub").appendVersion());
       data->setFreshnessPeriod(1_s);
-      data->setContent(makeBinaryBlock(tlv::nfd::Uri, FACEURI, ::strlen(FACEURI)));
+      data->setContent(makeStringBlock(tlv::nfd::Uri, "udp://router.example.net"));
       face.receive(*data);
       return;
     }
diff --git a/tools/ndn-autoconfig-server/program.cpp b/tools/ndn-autoconfig-server/program.cpp
index 21e7857..82c1497 100644
--- a/tools/ndn-autoconfig-server/program.cpp
+++ b/tools/ndn-autoconfig-server/program.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * 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,
@@ -53,12 +53,9 @@
 void
 Program::enableHubData(const FaceUri& hubFaceUri)
 {
-  std::string uri = hubFaceUri.toString();
-
   auto data = make_shared<Data>(Name(HUB_DATA_NAME).appendVersion());
   data->setFreshnessPeriod(1_h);
-  data->setContent(makeBinaryBlock(tlv::nfd::Uri,
-                                   reinterpret_cast<const uint8_t*>(uri.data()), uri.size()));
+  data->setContent(makeStringBlock(tlv::nfd::Uri, hubFaceUri.toString()));
   m_keyChain.sign(*data);
 
   m_face.setInterestFilter(HUB_DATA_NAME,
