I ignored the importance of subnets.I knew a switch can possess many subnets,whereas,
I did not handle this situation.So the discovery result would be inaccurate.
Therefore,I modified my discovery algorithm.A switch belongs to many subnets.
After discovering all devices in the lan,program probes every subnet in order to find
out all link roads among those switches.
Additional,I had a fault thought,the gateway must locate on a router,so I excluded
the router from the subnet.Today,I found the gateway can be also locate on a 3 layer
switch,and this switch is a member of this subnet.