A Framework for Distributed Channel Assignment in Wireless Mesh Networks