MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _iface_link_kind

Function _iface_link_kind

network_diagnostics.py:600–609  ·  view source on GitHub ↗

Authoritative tunnel kind from `ip -d link show` (iproute2 is always present), or None. Returns a friendly name like 'WireGuard' / 'GRE'.

(name)

Source from the content-addressed store, hash-verified

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': []}

Callers 1

_iface_vpn_infoFunction · 0.85

Calls 1

_runFunction · 0.85

Tested by

no test coverage detected