The end-to-end rate control in multiple-hop wireless networks: Cross-layer formulation and optimal allocation