The great advances made in the wireless technology have enabled the deployment of wireless communication networks in some of the harshest environments like volcanoes, hurricaneaffected regions, and underground mines. In such challenging environments suffering from the lack of infrastructure, traditional routing is not efficient, and sometimes not even feasible. Moreover, the exponential growth of the number of wireless connected devices has created the need for a new routing paradigm that could benefit from the potentials offered by these heterogeneous wireless devices. Hence, in order to overcome the traditional routing limitations, and to increase the capacity of current dynamic heterogeneous wireless networks, the opportunistic routing paradigm has been proposed and developed in recent research works. Motivated by the great interest that has been attributed to this new paradigm within the last decade, we provide a comprehensive survey of the existing literature related to opportunistic routing. We first study the main design building blocks of opportunistic routing. Then, we provide a taxonomy for opportunistic routing proposals, based on their routing objectives as well as the optimization tools and approaches used in the routing design. Hence, five opportunistic routing classes are defined and studied in this paper, namely geographic opportunistic routing, link-state-aware opportunistic routing, probabilistic opportunistic routing, optimization-based opportunistic routing, and cross-layer opportunistic routing. We also review the main protocols proposed in the literature for each class. Finally, we identify and discuss the main future research directions related to the opportunistic routing design, optimization and deployment.