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

Function _list_iface_names

network_diagnostics.py:457–469  ·  view source on GitHub ↗
(include_virtual=False)

Source from the content-addressed store, hash-verified

455 'server': (d.get('server') or {}).get('name'),
456 'server_location': (d.get('server') or {}).get('location'),
457 'isp': d.get('isp')}
458 except ValueError:
459 pass
460 return {'success': False, **meta,
461 'error': _speedtest_error(res, meta)}
462
463 # python speedtest-cli. To pin an interface we must bind the *device*: its
464 # own --source only sets a source address, which does not force egress (the
465 # packet still leaves via the default-route NIC wearing the other NIC's IP,
466 # and gets dropped as spoofed). speedtest_bind.py patches the socket layer
467 # with SO_BINDTODEVICE and then runs the very same client.
468 if bind:
469 wrapper = os.path.join(os.path.dirname(os.path.abspath(__file__)),
470 'python', 'speedtest_bind.py')
471 cmd = [sys.executable or 'python3', wrapper, iface, '--json']
472 else:

Callers 4

_local_ipv4_addrsFunction · 0.85
do_interfacesFunction · 0.85
do_l2_healthFunction · 0.85
do_ptp_detectFunction · 0.85

Calls 2

_runFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected