Authoritative tunnel kind from `ip -d link show` (iproute2 is always present), or None. Returns a friendly name like 'WireGuard' / 'GRE'.
(name)
| 598 | plugged into on *this* port" and a merged list you have to eyeball.""" |
| 599 | if not _have('lldpctl'): |
| 600 | return {'success': False, |
| 601 | 'error': 'lldpd/lldpctl is not installed. Click Install to add it ' |
| 602 | '(configured for LLDP + CDPv1/v2, EDP, FDP and SONMP so ' |
| 603 | 'Cisco, Extreme, Foundry and Nortel switches are seen too).', |
| 604 | 'missing_tool': 'lldpd', |
| 605 | 'neighbors': []} |
| 606 | if interface: |
| 607 | # Name/injection guard plus an existence check, so a typo surfaces as a |
| 608 | # clear error rather than an empty neighbour list that looks like "no |
| 609 | # switch found". |
| 610 | if not _valid_iface(interface) or interface not in _list_iface_names(include_virtual=True): |
| 611 | return {'success': False, 'error': f'Unknown interface: {interface}', |
| 612 | 'neighbors': []} |
no test coverage detected