alshabib

added test for lldp provider

Change-Id: I31e7c21840d48c38ec60ec7437657daccc185846
......@@ -24,7 +24,7 @@ public class DefaultInboundPacket implements InboundPacket {
* @param parsed parsed ethernet frame
* @param unparsed unparsed raw bytes
*/
public DefaultInboundPacket(ConnectPoint receivedFrom, Ethernet parsed,
public DefaultInboundPacket(ConnectPoint receivedFrom, Ethernet parsed,
ByteBuffer unparsed) {
this.receivedFrom = receivedFrom;
this.parsed = parsed;
......
......@@ -83,6 +83,7 @@ public class LinkDiscovery implements TimerTask {
private final PacketService pktService;
private final MastershipService mastershipService;
private Timeout timeout;
private boolean isStopped;
/**
* Instantiates discovery manager for the given physical switch. Creates a
......@@ -289,11 +290,13 @@ public class LinkDiscovery implements TimerTask {
public void stop() {
timeout.cancel();
isStopped = true;
}
public void start() {
timeout = Timer.getTimer().newTimeout(this, 0,
TimeUnit.MILLISECONDS);
isStopped = false;
}
/**
......@@ -352,4 +355,15 @@ public class LinkDiscovery implements TimerTask {
}
}
public boolean containsPort(Long portNumber) {
if (slowPorts.contains(portNumber) || fastPorts.contains(portNumber)) {
return true;
}
return false;
}
public boolean isStopped() {
return isStopped;
}
}
......