With the rapid development of wireless technology and portable devices, mobile adhoc networks (MANETs) are more and more present in our daily life. Ad-hoc networks are often composed of mobile and battery-supplied devices, like laptops, mobile phones, and PDAs. With no requirement for infrastructure support, MANETs can be used as temporary networks, such as for conference and office environments, and for disaster areas. The disadvantage is that they usually have limited bandwidth and that devices in ad-hoc networks have energy-constrained power supplies, which requires simple and efficient underlying communication protocols. One of the most fundamental actions that such devices in networks need to do is to find information about the environment they are operating in. To share and use the available context information in the network, devices first need to discover and locate the required information. This action is called context discovery. However, none of the existing discovery protocols can well support resource-limited fully-distributed MANETs. Therefore, in this thesis, we design and develop a new context discovery protocol for MANETs, which is called Ahoy.By using attenuated Bloom filters, Ahoy reduces traffic load to discover available context information and provides directional probabilistic querying. We build an analytical model to evaluate the performance of Ahoy compared with two conventional approaches: pro-active and reactive discovery protocols, and to allow for optimization of Ahoy's parameters. The results of the analytical model are validated by simulations. We estimate the network traffic generated by Ahoy in both static and dynamic environments. We find that Ahoy requires significantly less network traffic than the other two protocols in static networks, and that it is stable in a dynamic environment in which the network topology may change.We also study the vulnerability of Ahoy when it encounters different malicious attacks. Our analyses shows that compared with pro-active and reactive protocols, Ahoy is not more vulnerable than the other two protocols. In some cases, the use of attenuated Bloom filters can even help to protect the contents of packets up to a certain level. In case of serious risks, we propose specialized security countermeasures to enhance the network security of Ahoy.Finally, we build a prototype of Ahoy and test it on UNIX-like platforms.v vi Through these analysis and studies, we conclude that the novel discovery protocol Ahoy proposed in this thesis can discover information efficiently, while generating only little network traffic, in both static and dynamic fully-distributed MANETs.