New appctl 'lldp/neighbor' displays lldp neighbor information. Support json output with --format json --pretty Supoort dot1 and dot3 tlv
Example outputs would be: $ ovs-appctl lldp/neighbor ------------------------------------------------------------------------------- LLDP neighbor: ------------------------------------------------------------------------------- Interface: ens13np0 Chassis: Chassis ID: 38:a9:1c:18:a1:0a SysName: 7F-jieru-chuan SysDescr: H3C Comware Platform Software MgmtIP: 192.168.67.234 MgmtIface: 635 Capability: Bridge, on Capability: Router, on Port: PortID: GigabitEthernet1/0/15 PortDescr: GigabitEthernet1/0/15 Interface TTL: 121 MFS: 10240 PMD autoneg: supported: yes, enabled: yes Adv: 10Base-T, HD: yes, FD: yes Adv: 100Base-TX, HD: yes, FD: yes Adv: 1000Base-T, HD: no, FD: yes MAU oper type: 30 MDI Power: supported: yes, enabled: no, pair control: no Device type: PSE VLAN: 1, pvid: yes, VLAN 0001 ------------------------------------------------------------------------------- $ ovs-appctl --format json --pretty lldp/neighbor { "lldp": { "interface": [ { "ens13np0": { "chassis": { "7F-jieru-chuan": { "capability": [ { "enabled": true, "type": "Bridge"}, { "enabled": true, "type": "Router"}], "descr": "H3C Comware Platform Software", "id": { "type": "mac", "value": "38:a9:1c:18:a1:0a"}, "mgmt-iface": [ 635], "mgmt-ip": [ "192.168.67.234"]}}, "port": { "auto-negotiation": { "advertised": [ { "fd": true, "hd": true, "type": "10Base-T"}, { "fd": true, "hd": true, "type": "100Base-TX"}, { "fd": true, "hd": false, "type": "1000Base-T"}], "current": 30, "enabled": true, "supported": true}, "desc": "GigabitEthernet1/0/15 Interface", "id": { "type": "ifname", "value": "GigabitEthernet1/0/15"}, "mfs": 10240, "power": { "device-type": "PSE", "enabled": false, "paircontrol": false, "supported": true}, "ttl": 121}, "ppid": { "enabled": false, "supported": false}, "vlan": { "pvid": true, "value": "VLAN 0001", "vlan-id": 1}}}]}} Changliang Wu (3): lldp: Add ovs-appctl lldp/neighbor command. lldp: Decode dot1 dot3 tlv and display in lldp/neighbor. tests: lldp: Add testcases for lldp/neighbor. NEWS | 2 + lib/lldp/lldp-const.h | 41 ++- lib/lldp/lldp.c | 76 ++++- lib/lldp/lldpd-structs.h | 24 ++ lib/ovs-lldp.c | 630 +++++++++++++++++++++++++++++++++++++ tests/automake.mk | 1 + tests/ovs-lldp.at | 335 ++++++++++++++++++++ tests/testsuite.at | 1 + vswitchd/ovs-vswitchd.8.in | 4 + 9 files changed, 1096 insertions(+), 18 deletions(-) create mode 100644 tests/ovs-lldp.at -- 2.43.5 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev