@Test public void testIsUnicastMac() { assertTrue(NetUtils.isUnicastMac("ee:12:34:5:32:ff")); assertFalse(NetUtils.isUnicastMac("ff:12:34:5:32:ff")); assertFalse(NetUtils.isUnicastMac("01:12:34:5:32:ff")); assertTrue(NetUtils.isUnicastMac("00:ff:ff:ff:ff:ff")); }
if(!NetUtils.isValidMac(requestedMac)) { throw new InvalidParameterValueException("Mac address is not valid: " + requestedMac); } else if(!NetUtils.isUnicastMac(requestedMac)) { throw new InvalidParameterValueException("Mac address is not unicast: " + requestedMac);
public String getMacAddress() { if (macaddr == null) { return null; } if(!NetUtils.isValidMac(macaddr)) { throw new InvalidParameterValueException("Mac address is not valid: " + macaddr); } else if(!NetUtils.isUnicastMac(macaddr)) { throw new InvalidParameterValueException("Mac address is not unicast: " + macaddr); } return NetUtils.standardizeMacAddress(macaddr); }
public String getMacAddress() { if (macAddress == null) { return null; } if(!NetUtils.isValidMac(macAddress)) { throw new InvalidParameterValueException("Mac address is not valid: " + macAddress); } else if(!NetUtils.isUnicastMac(macAddress)) { throw new InvalidParameterValueException("Mac address is not unicast: " + macAddress); } return NetUtils.standardizeMacAddress(macAddress); }
@Test public void testIsUnicastMac() { assertTrue(NetUtils.isUnicastMac("ee:12:34:5:32:ff")); assertFalse(NetUtils.isUnicastMac("ff:12:34:5:32:ff")); assertFalse(NetUtils.isUnicastMac("01:12:34:5:32:ff")); assertTrue(NetUtils.isUnicastMac("00:ff:ff:ff:ff:ff")); }
public String getMacAddress() { if (macaddr == null) { return null; } if (!NetUtils.isValidMac(macaddr)) { throw new InvalidParameterValueException("MAC-Address is not valid: " + macaddr); } else if (!NetUtils.isUnicastMac(macaddr)) { throw new InvalidParameterValueException("MAC-Address is not unicast: " + macaddr); } return NetUtils.standardizeMacAddress(macaddr); }
public String getMacAddress() { if (macAddress == null) { return null; } if (!NetUtils.isValidMac(macAddress)) { throw new InvalidParameterValueException("MAC-Address is not valid: " + macAddress); } else if (!NetUtils.isUnicastMac(macAddress)) { throw new InvalidParameterValueException("MAC-Address is not unicast: " + macAddress); } return NetUtils.standardizeMacAddress(macAddress); }
if (!NetUtils.isValidMac(requestedMac)) { throw new InvalidParameterValueException("MAC-Address is not valid: " + requestedMac); } else if (!NetUtils.isUnicastMac(requestedMac)) { throw new InvalidParameterValueException("MAC-Address is not unicast: " + requestedMac);