Design and optimization of multiple access protocols for ad hoc wireless networks