## 1 Introduction  
Mobile _ad hoc_ networks are one of the emerging trends in wireless communication thanks to their wide application field. It is now common to find personal electronic devices, such as smartphones and wearables computers (smart-watches, smart-glasses, _etc._) with communication capabilities based on WiFi and/or IEEE 802.15 technologies that allow users to communicate and share information with each other in a network with a minimal deployment and without the need for an underlying infrastructure. Today, for example, it is possible for users attending a conference to share presentations, print documents or access the Internet without any configuration on their computers. At home, it is possible to adjust remotely the lighting and temperature or to change the music. On the road, vehicles can cooperate and deliver information about the state of the road. Military, weather prediction, agriculture, natural disasters areas, search and rescue operations and any other situation where infrastructure is either absent or unavailable are other examples of different kinds of _ad hoc_ networks. Mobile _ad hoc_ networks consist of a collection of wireless mobile nodes that dynamically exchange data among themselves without the reliance on a fixed base station or a wired backbone network. These nodes are free to move, to join or to leave the network at any time. They move randomly and organize themselves on a random basis. This high mobility of nodes causes the network topology to change rapidly and unpredictably. Moreover, these nodes may run out of battery power, fail or decide to shut down at any time. Thus, a MANET is a self-created, self-organized and self-administrated network. It is a network with neither fixed infrastructure requirements nor centralized management for its operation. The network nodes work together with minimal central control and human intervention. All of the nodes of these networks behave as routers and take part in discovery and maintenance of routes to other nodes in the network. Nodes in the network cooperate in routing and forwarding. Most of them have limited computational capabilities, battery life, memory availability and CPU performance capacity. When the _ad hoc_ network is established, nodes will run different applications. These applications will usually provide and request services in the _ad hoc_ network. In these terms, service discovery is an important area. Service discovery architectures let the nodes discover services, as well as to use the available services in the network. The automatic discovery of services is therefore a crucial feature in mobile _ad hoc_ networks. Systems and protocols that provide service discovery solutions are plentiful and diverse, although most of them are not appropriate for mobile _ad hoc_ networks. Traditional service discovery strategies are defined for an almost completely static environment with rare network topology changes. The architecture of these protocols is centralized, with servers storing services in a central node directory, not designed for networks with mobile nodes. Service discovery protocols designed for _ad hoc_ networks require a distributed approach where server nodes should also be autonomous and able to announce their presence and the services that they provide. The problem of service discovery was first considered for the Internet, with the creation of the Internet Engineering Task Force's (IETF) Service Location (SRVLOC) group in 1993. The main result of the group was the definition of the Service Location Protocol (SLP). SLP Version 2 is currently an Internet standard (Request For Comments (RFC) 2608) [1]. This protocol was defined at the application layer, and then, the first service discovery protocols for MANETs have been also defined at this layer [2,3]. However, these protocols do not provide any information about the route to the service provider. Inorder to obtain this information, a separate routing process is required.