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

Function _default_route_iface

network_diagnostics.py:770–776  ·  view source on GitHub ↗

Return the interface carrying the IPv4 default route, or None. Used to tell whether this host's internet traffic egresses through a VPN tunnel.

()

Source from the content-addressed store, hash-verified

768 for i, mac, _ in _neigh_entries():
769 if i == ip:
770 return mac
771 return None
772
773
774def _arp_baseline_load():
775 try:
776 with open(_ARP_BASELINE_PATH) as f:
777 d = json.load(f)
778 return d if isinstance(d, dict) else {}
779 except (OSError, ValueError):

Callers 2

do_network_identityFunction · 0.85
do_locate_portFunction · 0.85

Calls 1

_runFunction · 0.85

Tested by

no test coverage detected