Foundations of Ad Hoc Wireless Networks