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

Function _default_gateway

network_diagnostics.py:763–767  ·  view source on GitHub ↗

Return the IPv4 default gateway IP, or None.

()

Source from the content-addressed store, hash-verified

761 if not ip:
762 return None
763 for i, mac, _ in _neigh_entries():
764 if i == ip:
765 return mac
766 _run(['ping', '-n', '-c', '1', '-W', '1', ip], timeout=3)
767 for i, mac, _ in _neigh_entries():
768 if i == ip:
769 return mac
770 return None

Callers 1

do_network_identityFunction · 0.85

Calls 1

_runFunction · 0.85

Tested by

no test coverage detected