A method of characterizing network topology based on the breadth-first search tree