Self-Structuring Networks Using Gossiping