This is a python script that can be run on Linux, Solaris, and AIX. The minimum requirements are python 2.6.0.
The code works by creating a raw socket on Linux (or calling snoop on Solaris 10/11 and tcpdump on AIX) to sniff for LLDP packets on all available network interfaces. Once an LLDP packet has been sniffed/gathered/received it is deconstructed and the relevant data is saved to a a file containing the relevant information (VLANID, Ethernet Port ID, Port description and the Switch name)
To-Do: Add more description.