HA - ARPHandler Event sync
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / utils / NetUtils.java
index a3f21cff3eb50ad3d062b1c381a79abf35b81f2e..f81e7e3d03b0c4af14f5e539b45567725d80c43b 100644 (file)
@@ -322,6 +322,19 @@ public abstract class NetUtils {
 
         return false;
     }
+    /**
+     * Returns true if the MAC address is a unicast MAC address and false
+     * otherwise.
+     *
+     * @param MACAddress
+     * @return
+     */
+    public static boolean isUnicastMACAddr(byte[] MACAddress) {
+        if (MACAddress.length == MACAddrLengthInBytes) {
+            return (MACAddress[0] & 1) == 0;
+        }
+        return false;
+    }
 
     /**
      * Returns true if the MAC address is a multicast MAC address and false