## 1 Introduction  
The Internet of Things (IoT) is envisioned to interconnect together billions of heterogeneous devices, denoted as Smart Objects (SOs), in a global Internet-like \"network of networks\" structure, thus allowing them to connect seamlessly to standard Internet hosts. In this way, new forms of interactions and applications among things and humans will be enabled, owing to the foreseen use of an IP-based protocol stack for IoT devices. The IoT will thus include nodes with different features, in terms of processing, communication capabilities, power supply, and energy consumption, spanning from SOs to smartphones, Internet hosts, up to the Cloud. The majority of deployed IoT devices will likely operate in Low-power and Lossy Networks (LLNs). In this context, the IP protocol has been recognized as the true IoT enabler, as it allows full interoperability among heterogeneous objects and the canonical Internet. Some international standardization organizations, such as the Internet Engineering Task Force (IETF) and the Institute of Electrical and Electronics Engineers (IEEE), have contributed to the definition of protocols suitable to LLNs, such as the IETF ROLL Working Group [1] or the IETF 6 LoWPAN Working Group [2]. In detail, the ROLL WG introduced the IPv6 Routing Protocol for Low-Power and Lossy Networks (RPL) [3], a lightweight routing protocol for LLNs, while the 6 LoWPAN WG defined 6 LoWPAN [4], a header compression mechanism that allows to send IPv6 frames over IEEE 802.15.4 networks. A crucial aspect for constrained IoT scenarios is the nodes' capability to self-adapt and configure to the surrounding environment. This is a fundamental capability, since it avoids the need for external human intervention and configuration, especially for highly dynamic scenarios (e.g., smart city scenarios). Among different approaches to satisfy this requirement, Service Discovery (SD) and Resource Discovery (RD) play a fundamental role. They are representative of the ability of an IoT device to be aware of the presence of (i) resources/services in an IoT-oriented network and (ii) endpoints allowing to access the discovered resources/services. In particular, SD is suitable for networks in which auto-configuration capabilities are required (i.e., networks composed by a large number of nodes). In the presence of large amounts of IoT devices, RD can be seen as a relevant natural capability, as an IoT node is expected to expose several resources that can be/need to be discovered to fully interact with these nodes. Among different application protocols that can be adopted in IoT scenarios, the most relevant one is represented by the (request/response) Constrained Application Protocol (CoAP) [5]. CoAP assures that IoT nodes (implementing a CoAP-based server) expose a particular resource, addressable at the Uniform Resource Identifier (URI) /.well-known/core. A unicast CoAP GET request to the URI obtains, as a response, a (formatted in CoRE Link format [6]) list containing all the CoAP resources available on the queried CoAP server. In this way, CoAP provides a simple and practical RD mechanism available for both constrained and powerful devices. Several approaches to both RD and SD have been proposed, for both IoT-oriented scenarios and, in general, for the Internet. However, these approaches are not exempt from disadvantages, typically requiring heavy information exchange procedures, as well as sometimes being time- and energy-consuming during both RD and SD phases, thus being \"lethal\" for battery-powered constrained IoT devices. This underlines the requirement, for an IoT network, to rely on lightweight information exchange mechanisms, thus bringing also benefits to multi-hop communications among SOs, in terms of energy consumption and transmission delays. However, the need to adopt small footprint mechanisms is critical, due to the limited amount of memory available on SOs, to allow developers to deploy their applications without the need to sacrifice some features, abiding by practical memory constraints.