Refactor MacAddress and ONOSLLDP class
- Implement unit tests for MacAddress
- Implement new method to get OUI
- Rename isLinkLocal to isLldp to describe this method more precisely
- Remove ON.Lab specific names in the code
Change-Id: I01ef9ed94f7bd7e3930a4746627257ef9667c7a3
diff --git a/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java b/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java
index b012d28..f4e2231 100644
--- a/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java
+++ b/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java
@@ -20,6 +20,7 @@
import org.jboss.netty.util.Timeout;
import org.jboss.netty.util.TimerTask;
import org.onlab.packet.Ethernet;
+import org.onlab.packet.MacAddress;
import org.onlab.packet.ONOSLLDP;
import org.onlab.util.Timer;
import org.onosproject.net.ConnectPoint;
@@ -82,12 +83,12 @@
ethPacket = new Ethernet();
ethPacket.setEtherType(Ethernet.TYPE_LLDP);
- ethPacket.setDestinationMACAddress(ONOSLLDP.LLDP_ONLAB);
+ ethPacket.setDestinationMACAddress(MacAddress.ONOS_LLDP);
ethPacket.setPad(true);
bddpEth = new Ethernet();
bddpEth.setEtherType(Ethernet.TYPE_BSN);
- bddpEth.setDestinationMACAddress(ONOSLLDP.BDDP_MULTICAST);
+ bddpEth.setDestinationMACAddress(MacAddress.BROADCAST);
bddpEth.setPad(true);
isStopped = true;