MCPcopy Index your code
hub / github.com/python/cpython / _netstat_getnode

Function _netstat_getnode

Lib/uuid.py:626–629  ·  view source on GitHub ↗

Get the hardware address on Unix by running netstat.

()

Source from the content-addressed store, hash-verified

624 return _find_mac_near_keyword('lanscan', '-ai', [b'lan0'], lambda i: 0)
625
626def _netstat_getnode():
627 """Get the hardware address on Unix by running netstat."""
628 # This works on AIX and might work on Tru64 UNIX.
629 return _find_mac_under_heading('netstat', '-ian', b'Address')
630
631
632# Import optional C extension at toplevel, to help disabling it when testing

Callers

nothing calls this directly

Calls 1

_find_mac_under_headingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…