or download this
$cdp = "Device-ID (0x01), length: 44 bytes: 'my-switch-name'
Address (0x02), length: 13 bytes: IPv4 (1) 10.1.1.10
Port-ID (0x03), length: 16 bytes: 'Ethernet101/1/20'
...
0x0000: 060c 2b06 0104 0109 0c03 0103 880e
Management Addresses (0x16), length: 13 bytes: IPv4 (1) 10.151.69.11
Physical Location (0x17), length: 13 bytes: 0x00/snmplocation"