The best GPL tool that I've come across in a long while, as far as network discovery goes, would have to be the discovery engine inside Netdisco (http://www.netdisco.org). This tool is fairly Cisco-centric, but Max has put a lot of work into a tool for folks who are tired of CiscoWorks not working.
netdisco does automated topology discovery for CDP-speaking devices (where the C is Cisco and not Cabletron). That includes Cisco gear and some HP stuff (at least the ProCurve line of switches - not sure what else they have it in). netdisco will also do topology discovery using Bay's discovery protocol (though this probably only exists in old stuff and likely didn't make the cut in the move to Nortel). There's some hope for using the work done by some guys at Bell Labs to do the L2 topology discovery relying on existing MIBs (primarily the BRIDGE MIB), and there is proof-of-concept code, but that's mostly wishful thinking at this point.