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: p1
Chassis:
Chassis ID: aa:aa:aa:aa:aa:aa
SysName: FakeSystemName
SysDescr: FakeSystemDesc
MgmtIP: 192.168.0.1
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
VLAN: 1, pvid: yes, VLAN 0001
PPVID: supported: yes,enabled no
$ ovs-appctl --format json --pretty lldp/neighbor
{
"lldp": {
"interface": {
"p1": {
"chassis": {
"FakeSystemName": {
"capability": [
{
"enabled": true,
"type": "Bridge"},
{
"enabled": true,
"type": "Router"}],
"descr": "FakeSystemDesc",
"id": {
"type": "mac",
"value": "aa:aa:aa:aa:aa:aa"},
"mgmt-iface": [
635],
"mgmt-ip": [
"192.168.0.1"]}},
"port": {
"auto-negotiation": {
"current": 30,
"enabled": true,
"supported": true},
"desc": "GigabitEthernet1/0/15 Interface",
"id": {
"type": "ifname",
"value": "GigabitEthernet1/0/15"},
"mfs": 10240,
"power": {
"enabled": false,
"paircontrol": false,
"supported": true},
"ttl": 121},
"ppvid": {
"enabled": false,
"supported": true},
"vlan": {
"pvid": true,
"value": "VLAN 0001",
"vlan-id": 1}}}}}
V2: fix code lint and build warn
V3: fix more static analyze error
V4: fix build error
V5: add json output, add NEWS
V6: add dot1 and dot3, fix review problems
V7: split patch to patch set
V8: refactor dot1 and dot3 from lldpd, fix revew problems
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 | 3 +
lib/lldp/lldp-const.h | 5 +
lib/lldp/lldp.c | 164 ++++++++-
lib/lldp/lldpd-structs.h | 69 ++++
lib/ovs-lldp.c | 672 +++++++++++++++++++++++++++++++++++++
tests/automake.mk | 1 +
tests/ovs-lldp.at | 232 +++++++++++++
tests/testsuite.at | 1 +
vswitchd/ovs-vswitchd.8.in | 4 +
9 files changed, 1149 insertions(+), 2 deletions(-)
create mode 100644 tests/ovs-lldp.at
--
2.43.5
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev