<p>
The source media access control (MAC) address of network-related information about a finding.
</p>

@param networkSourceMac
The source media access control (MAC) address of network-related information about a finding.
772248
public void setNetworkSourceMac(java.util.Collection<StringFilter> networkSourceMac) {
        if (networkSourceMac == null) {
            this.networkSourceMac = null;
            return;
        }

        this.networkSourceMac = new java.util.ArrayList<StringFilter>(networkSourceMac);
    }
988309
public byte[] getHardwareAddress()
  {
    if (CurrentTime.isTest() || System.getProperty("test.mac") != null) {
      return new byte[] { 10, 0, 0, 0, 0, 10 };
    }
    
    for (NetworkInterfaceBase nic : getNetworkInterfaces()) {
      if (! nic.isLoopback()) {
        return nic.getHardwareAddress();
      }
    }
    
    try {
      InetAddress localHost = InetAddress.getLocalHost();
      
      return localHost.getAddress();
    } catch (Exception e) {
      log.log(Level.FINER, e.toString(), e);
    }
    
    return new byte[0];
  }
511670
@Pure
	public static MACNumber getPrimaryAdapter() {
		final Enumeration<NetworkInterface> interfaces;
		try {
			interfaces = NetworkInterface.getNetworkInterfaces();
		} catch (SocketException exception) {
			return null;
		}
		if (interfaces != null) {
			NetworkInterface inter;
			while (interfaces.hasMoreElements()) {
				inter = interfaces.nextElement();
				try {
					final byte[] addr = inter.getHardwareAddress();
					if (addr != null) {
						return new MACNumber(addr);
					}
				} catch (SocketException exception) {
					// Continue to the next loop.
				}
			}
		}
		return null;
	}
865989
public void setResourceAwsIamAccessKeyStatus(java.util.Collection<StringFilter> resourceAwsIamAccessKeyStatus) {
        if (resourceAwsIamAccessKeyStatus == null) {
            this.resourceAwsIamAccessKeyStatus = null;
            return;
        }

        this.resourceAwsIamAccessKeyStatus = new java.util.ArrayList<StringFilter>(resourceAwsIamAccessKeyStatus);
    }
241460
public OvhConnectedDevice serviceName_modem_connectedDevices_macAddress_GET(String serviceName, String macAddress) throws IOException {
		String qPath = "/xdsl/{serviceName}/modem/connectedDevices/{macAddress}";
		StringBuilder sb = path(qPath, serviceName, macAddress);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhConnectedDevice.class);
	}
1298628
def mac_address(ip):
    """"""
    mac = ''
    for line in os.popen('/sbin/ifconfig'):
        s = line.split()
        if len(s) > 3:
            if s[3] == 'HWaddr':
                mac = s[4]
            elif s[2] == ip:
                break
    return {'MAC': mac}
44772
def _get_primary_address(self, mac_address, node_list):
        
        for local_addresses in node_list:
            if mac_address in local_addresses:
                return local_addresses[0]
        return mac_address
554962
def _hunt_for_mac(to_find, type_of_thing, net_ok=True):
    # type: (Optional[str], int, bool) -> Optional[str]
    
    if to_find is None:
        log.warning("_hunt_for_mac() failed: to_find is None")
        return None
    if not PY2 and isinstance(to_find, bytes):
        to_find = str(to_find, 'utf-8')

    if WINDOWS and type_of_thing == INTERFACE:
        methods = [
            # getmac - Connection Name
            (r'\r\n' + to_find + r'.*' + MAC_RE_DASH + r'.*\r\n',
             0, 'getmac.exe', ['/NH /V']),

            # ipconfig
            (to_find + r'(?:\n?[^\n]*){1,8}Physical Address[ .:]+' + MAC_RE_DASH + r'\r\n',
             0, 'ipconfig.exe', ['/all']),

            # getmac - Network Adapter (the human-readable name)
            (r'\r\n.*' + to_find + r'.*' + MAC_RE_DASH + r'.*\r\n',
             0, 'getmac.exe', ['/NH /V']),

            # wmic - WMI command line utility
            lambda x: _popen('wmic.exe', 'nic where "NetConnectionID = \'%s\'" get '
                                         'MACAddress /value' % x).strip().partition('=')[2],
        ]
    elif (WINDOWS or WSL) and type_of_thing in [IP4, IP6, HOSTNAME]:
        methods = [
            # arp -a - Parsing result with a regex
            (MAC_RE_DASH, 0, 'arp.exe', ['-a %s' % to_find]),
        ]

        # Add methods that make network requests
        # Insert it *after* arp.exe since that's probably faster.
        if net_ok and type_of_thing != IP6 and not WSL:
            methods.insert(1, _windows_ctypes_host)
    elif (DARWIN or FREEBSD) and type_of_thing == INTERFACE:
        methods = [
            (r'ether ' + MAC_RE_COLON,
             0, 'ifconfig', [to_find]),

            # Alternative match for ifconfig if it fails
            (to_find + r'.*ether ' + MAC_RE_COLON,
             0, 'ifconfig', ['']),

            (MAC_RE_COLON,
             0, 'networksetup', ['-getmacaddress %s' % to_find]),
        ]
    elif FREEBSD and type_of_thing in [IP4, IP6, HOSTNAME]:
        methods = [
            (r'\(' + re.escape(to_find) + r'\)\s+at\s+' + MAC_RE_COLON,
             0, 'arp', [to_find])
        ]
    elif OPENBSD and type_of_thing == INTERFACE:
        methods = [
            (r'lladdr ' + MAC_RE_COLON,
             0, 'ifconfig', [to_find]),
        ]
    elif OPENBSD and type_of_thing in [IP4, IP6, HOSTNAME]:
        methods = [
            (re.escape(to_find) + r'[ ]+' + MAC_RE_COLON,
             0, 'arp', ['-an']),
        ]
    elif type_of_thing == INTERFACE:
        methods = [
            _read_sys_iface_file,
            _fcntl_iface,

            # Fast modern Ubuntu ifconfig
            (r'ether ' + MAC_RE_COLON,
             0, 'ifconfig', [to_find]),

            # Fast ifconfig
            (r'HWaddr ' + MAC_RE_COLON,
             0, 'ifconfig', [to_find]),

            # ip link (Don't use 'list' due to SELinux [Android 24+])
            (to_find + r'.*\n.*link/ether ' + MAC_RE_COLON,
             0, 'ip', ['link %s' % to_find, 'link']),

            # netstat
            (to_find + r'.*HWaddr ' + MAC_RE_COLON,
             0, 'netstat', ['-iae']),

            # More variations of ifconfig
            (to_find + r'.*ether ' + MAC_RE_COLON,
             0, 'ifconfig', ['']),
            (to_find + r'.*HWaddr ' + MAC_RE_COLON,
             0, 'ifconfig', ['', '-a', '-v']),

            # Tru64 ('-av')
            (to_find + r'.*Ether ' + MAC_RE_COLON,
             0, 'ifconfig', ['-av']),
            _uuid_lanscan_iface,
        ]
    elif type_of_thing in [IP4, IP6, HOSTNAME]:
        esc = re.escape(to_find)
        methods = [
            _read_arp_file,
            lambda x: _popen('ip', 'neighbor show %s' % x)
            .partition(x)[2].partition('lladdr')[2].strip().split()[0],

            (r'\(' + esc + r'\)\s+at\s+' + MAC_RE_COLON,
             0, 'arp', [to_find, '-an', '-an %s' % to_find]),

            # Darwin oddness
            (r'\(' + esc + r'\)\s+at\s+' + MAC_RE_DARWIN,
             0, 'arp', [to_find, '-a', '-a %s' % to_find]),
            _uuid_ip,
        ]
    else:
        log.critical("Reached end of _hunt_for_mac() if-else chain!")
        return None
    return _try_methods(methods, to_find)
777941
public static boolean isMacOs() {
        String osName = System.getProperty("os.name");
        return osName == null ? false : osName.toLowerCase().startsWith("mac");
    }
154945
func (s *Network) SetSourceMac(v string) *Network {
	s.SourceMac = &v
	return s
}
1209215
public final void setGuaranteedCrossBusSourceBusUUID(SIBUuid8 value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedCrossBusSourceBusUUID", value);
        if (value != null)
            getHdr2().setField(JsHdr2Access.GUARANTEEDXBUS_SET_SOURCEBUSUUID, value.toByteArray());
        else
            getHdr2().setField(JsHdr2Access.GUARANTEEDXBUS_SET_SOURCEBUSUUID, null);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedCrossBusSourceBusUUID");
    }
1329660
public void setChaincodeSourceLocation(File chaincodeSourceLocation) throws InvalidArgumentException {
        if (chaincodeSourceLocation == null) {
            throw new InvalidArgumentException("Chaincode source location may not be null.");
        }
        if (chaincodeInputStream != null) {
            throw new InvalidArgumentException("Error setting chaincode location. Chaincode input stream already set. Only one or the other maybe set.");
        }

        this.chaincodeSourceLocation = chaincodeSourceLocation;
    }
550734
def _CreateInterfaceMapNetifaces(self):
    

    interfaces = {}
    for interface in netifaces.interfaces():
      af_link = netifaces.ifaddresses(interface).get(netifaces.AF_LINK, [])
      mac_address = next(iter(af_link), {}).get('addr', '')
      # In some systems this field can come with an empty string or with the
      # name of the interface when there is no MAC address associated with it.
      # Check the regex to be sure.
      if MAC_REGEX.match(mac_address):
        interfaces[mac_address] = interface
      else:
        message = 'Unable to determine MAC address for %s.'
        self.logger.warning(message, interface)
    return interfaces
415361
protected static void lookupMethodResource(javax.naming.Context context,
            Object instance, Method method, String name)
            throws NamingException, IllegalAccessException, InvocationTargetException
    {

        if (!method.getName().startsWith("set")
                || method.getParameterTypes().length != 1
                || !method.getReturnType().getName().equals("void"))
        {
            throw new IllegalArgumentException("Invalid method resource injection annotation");
        }

        Object lookedupResource;

        if ((name != null) && (name.length() > 0))
        {
            // TODO local or global JNDI
            lookedupResource = context.lookup(JAVA_COMP_ENV + name);
        }
        else
        {
            // TODO local or global JNDI
            lookedupResource =
                    context.lookup(JAVA_COMP_ENV + instance.getClass().getName() + "/" + getFieldName(method));
        }

        boolean accessibility = method.isAccessible();
        method.setAccessible(true);
        method.invoke(instance, lookedupResource);
        method.setAccessible(accessibility);
    }
765498
def set_mac_addr(self, mac_addr):
        

        yield from self._hypervisor.send('{platform} set_mac_addr "{name}" {mac_addr}'.format(platform=self._platform,
                                                                                              name=self._name,
                                                                                              mac_addr=mac_addr))

        log.info('Router "{name}" [{id}]: MAC address updated from {old_mac} to {new_mac}'.format(name=self._name,
                                                                                                  id=self._id,
                                                                                                  old_mac=self._mac_addr,
                                                                                                  new_mac=mac_addr))
        self._mac_addr = mac_addr
1349652
func (s *AwsSecurityFindingFilters) SetNetworkSourceMac(v []*StringFilter) *AwsSecurityFindingFilters {
	s.NetworkSourceMac = v
	return s
}
1193087
def mac_address
      raise ::Fission::Error,"VM #{@name} does not exist" unless self.exists?

      line=File.new(vmx_path).grep(/^ethernet0.generatedAddress =/)
      if line.nil?
        #Fission.ui.output "Hmm, the vmx file #{vmx_path} does not contain a generated mac address "
        return nil
      end
      address=line.first.split("=")[1].strip.split(/\"/)[1]
      return address
    end