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

Function net_whois

network_diagnostics.py:1960–1966  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1958 return names
1959
1960
1961def _iface_link_details(iface):
1962 """MAC, operstate, and VLAN info from `ip -d link show`."""
1963 res = _run(['ip', '-d', 'link', 'show', 'dev', iface], timeout=5)
1964 out = res['out']
1965 d = {'mac': None, 'operstate': None, 'vlan_id': None, 'vlan_proto': None}
1966 m = re.search(r'state (\S+)', out)
1967 if m:
1968 d['operstate'] = m.group(1)
1969 m = re.search(r'link/\w+\s+([0-9a-fA-F:]{17})', out)

Callers

nothing calls this directly

Calls 5

_valid_targetFunction · 0.85
_badFunction · 0.85
_logFunction · 0.85
do_whoisFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected