Distance computation, information dissemination, and wireless capacity in networks