Wireless ad hoc networks are temporary networks because they are formed to fulfil a special purpose and cease to exist after fulfilling this purpose. Mobile devices might arbitrarily leave or join the network at any time, thus ad hoc networks have a dynamic infrastructure. The number of applications that involve wireless communications among mobile devices is rapidly growing. Many of these applications require the wireless network to be spontaneously formed by the participating mobile devices themselves. In wireless ad hoc networks, mobile nodes communicate with other nodes over wireless links, without the support of pre-existing infrastructures, which is an attractive form of peer communications for certain applications.