Lines Matching refs:mac
377 def _is_universal(mac): argument
378 return not (mac & (1 << 41))
393 mac = int(word.replace(b':', b''), 16)
394 if _is_universal(mac):
395 return mac
396 first_local_mac = first_local_mac or mac
413 mac = _find_mac('ifconfig', args, keywords, lambda i: i+1)
414 if mac:
415 return mac
421 mac = _find_mac('ip', 'link', [b'link/ether'], lambda i: i+1)
422 if mac:
423 return mac
435 mac = _find_mac('arp', '-an', [os.fsencode(ip_addr)], lambda i: -1)
436 if mac:
437 return mac
440 mac = _find_mac('arp', '-an', [os.fsencode(ip_addr)], lambda i: i+1)
441 if mac:
442 return mac
445 mac = _find_mac('arp', '-an', [os.fsencode('(%s)' % ip_addr)],
448 if mac:
449 return mac
476 mac = int(word.replace(b':', b''), 16)
477 if _is_universal(mac):
478 return mac
479 first_local_mac = first_local_mac or mac
509 mac = int(value.replace('-', ''), 16)
510 if _is_universal(mac):
511 return mac
512 first_local_mac = first_local_mac or mac
544 mac = int.from_bytes(bytes, 'big')
545 if _is_universal(mac):
546 return mac
547 first_local_mac = first_local_mac or mac