A Framework for the Self-Configuration of Wireless Mesh Networks