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

Function _ip_getnode

Lib/uuid.py:585–591  ·  view source on GitHub ↗

Get the hardware address on Unix by running ip.

()

Source from the content-addressed store, hash-verified

583 return None
584
585def _ip_getnode():
586 """Get the hardware address on Unix by running ip."""
587 # This works on Linux with iproute2.
588 mac = _find_mac_near_keyword('ip', 'link', [b'link/ether'], lambda i: i+1)
589 if mac:
590 return mac
591 return None
592
593def _arp_getnode():
594 """Get the hardware address on Unix by running arp."""

Callers

nothing calls this directly

Calls 1

_find_mac_near_keywordFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…