alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright 2014 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | ******************************************************************************/ |
| 16 | package org.onlab.onos.provider.of.link.impl; |
| 17 | |
tom | 782a7cf | 2014-09-11 23:58:38 -0700 | [diff] [blame] | 18 | import static org.onlab.onos.of.controller.Dpid.uri; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 19 | import static org.slf4j.LoggerFactory.getLogger; |
| 20 | |
| 21 | import java.util.Collections; |
| 22 | import java.util.HashMap; |
| 23 | import java.util.HashSet; |
| 24 | import java.util.Iterator; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 25 | import java.util.Map; |
| 26 | import java.util.Set; |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 27 | import java.util.concurrent.ConcurrentHashMap; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 28 | import java.util.concurrent.TimeUnit; |
| 29 | import java.util.concurrent.atomic.AtomicInteger; |
| 30 | |
| 31 | import org.jboss.netty.util.Timeout; |
| 32 | import org.jboss.netty.util.TimerTask; |
| 33 | import org.onlab.onos.net.ConnectPoint; |
| 34 | import org.onlab.onos.net.DeviceId; |
| 35 | import org.onlab.onos.net.Link.Type; |
| 36 | import org.onlab.onos.net.PortNumber; |
| 37 | import org.onlab.onos.net.link.DefaultLinkDescription; |
| 38 | import org.onlab.onos.net.link.LinkDescription; |
| 39 | import org.onlab.onos.net.link.LinkProviderService; |
| 40 | import org.onlab.onos.of.controller.Dpid; |
| 41 | import org.onlab.onos.of.controller.OpenFlowController; |
| 42 | import org.onlab.onos.of.controller.OpenFlowSwitch; |
| 43 | import org.onlab.packet.Ethernet; |
| 44 | import org.onlab.packet.ONLabLddp; |
| 45 | import org.onlab.packet.ONLabLddp.DPIDandPort; |
tom | 8bf2e6b | 2014-09-10 20:53:54 -0700 | [diff] [blame] | 46 | import org.onlab.util.Timer; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 47 | import org.projectfloodlight.openflow.protocol.OFFactory; |
| 48 | import org.projectfloodlight.openflow.protocol.OFMessage; |
| 49 | import org.projectfloodlight.openflow.protocol.OFPacketOut; |
| 50 | import org.projectfloodlight.openflow.protocol.OFPortDesc; |
| 51 | import org.projectfloodlight.openflow.protocol.action.OFAction; |
| 52 | import org.projectfloodlight.openflow.protocol.action.OFActionOutput; |
| 53 | import org.projectfloodlight.openflow.types.OFBufferId; |
| 54 | import org.projectfloodlight.openflow.types.OFPort; |
| 55 | import org.slf4j.Logger; |
| 56 | |
| 57 | |
| 58 | |
| 59 | /** |
| 60 | * Run discovery process from a physical switch. Ports are initially labeled as |
| 61 | * slow ports. When an LLDP is successfully received, label the remote port as |
| 62 | * fast. Every probeRate milliseconds, loop over all fast ports and send an |
| 63 | * LLDP, send an LLDP for a single slow port. Based on FlowVisor topology |
| 64 | * discovery implementation. |
| 65 | * |
| 66 | * TODO: add 'fast discovery' mode: drop LLDPs in destination switch but listen |
| 67 | * for flow_removed messages |
| 68 | */ |
| 69 | public class LinkDiscovery implements TimerTask { |
| 70 | |
| 71 | private final OpenFlowSwitch sw; |
| 72 | // send 1 probe every probeRate milliseconds |
| 73 | private final long probeRate; |
| 74 | private final Set<Integer> slowPorts; |
| 75 | private final Set<Integer> fastPorts; |
| 76 | // number of unacknowledged probes per port |
| 77 | private final Map<Integer, AtomicInteger> portProbeCount; |
| 78 | // number of probes to send before link is removed |
| 79 | private static final short MAX_PROBE_COUNT = 3; |
| 80 | private Iterator<Integer> slowIterator; |
| 81 | private final OFFactory ofFactory; |
| 82 | private final Logger log = getLogger(getClass()); |
| 83 | private final ONLabLddp lldpPacket; |
| 84 | private final Ethernet ethPacket; |
| 85 | private Ethernet bddpEth; |
| 86 | private final boolean useBDDP; |
| 87 | private final OpenFlowController ctrl; |
| 88 | private final LinkProviderService linkProvider; |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 89 | private final Map<Integer, OFPortDesc> ports; |
alshabib | c944fd0 | 2014-09-10 17:55:17 -0700 | [diff] [blame] | 90 | private Timeout timeout; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 91 | |
| 92 | /** |
| 93 | * Instantiates discovery manager for the given physical switch. Creates a |
| 94 | * generic LLDP packet that will be customized for the port it is sent out on. |
| 95 | * Starts the the timer for the discovery process. |
| 96 | * |
| 97 | * @param sw the physical switch |
| 98 | * @param useBDDP flag to also use BDDP for discovery |
| 99 | */ |
| 100 | public LinkDiscovery(final OpenFlowSwitch sw, |
| 101 | OpenFlowController ctrl, LinkProviderService providerService, Boolean... useBDDP) { |
| 102 | this.sw = sw; |
| 103 | this.ofFactory = sw.factory(); |
| 104 | this.ctrl = ctrl; |
alshabib | 7674db4 | 2014-09-12 23:40:46 -0700 | [diff] [blame] | 105 | this.probeRate = 3000; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 106 | this.linkProvider = providerService; |
| 107 | this.slowPorts = Collections.synchronizedSet(new HashSet<Integer>()); |
| 108 | this.fastPorts = Collections.synchronizedSet(new HashSet<Integer>()); |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 109 | this.ports = new ConcurrentHashMap<>(); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 110 | this.portProbeCount = new HashMap<Integer, AtomicInteger>(); |
| 111 | this.lldpPacket = new ONLabLddp(); |
| 112 | this.lldpPacket.setSwitch(this.sw.getId()); |
| 113 | this.ethPacket = new Ethernet(); |
| 114 | this.ethPacket.setEtherType(Ethernet.TYPE_LLDP); |
| 115 | this.ethPacket.setDestinationMACAddress(ONLabLddp.LLDP_NICIRA); |
| 116 | this.ethPacket.setPayload(this.lldpPacket); |
| 117 | this.ethPacket.setPad(true); |
| 118 | this.useBDDP = useBDDP.length > 0 ? useBDDP[0] : false; |
| 119 | if (this.useBDDP) { |
| 120 | this.bddpEth = new Ethernet(); |
| 121 | this.bddpEth.setPayload(this.lldpPacket); |
| 122 | this.bddpEth.setEtherType(Ethernet.TYPE_BSN); |
| 123 | this.bddpEth.setDestinationMACAddress(ONLabLddp.BDDP_MULTICAST); |
| 124 | this.bddpEth.setPad(true); |
| 125 | log.info("Using BDDP to discover network"); |
| 126 | } |
| 127 | for (OFPortDesc port : sw.getPorts()) { |
| 128 | if (port.getPortNo() != OFPort.LOCAL) { |
| 129 | addPort(port); |
| 130 | } |
| 131 | } |
alshabib | 7674db4 | 2014-09-12 23:40:46 -0700 | [diff] [blame] | 132 | timeout = Timer.getTimer().newTimeout(this, 0, |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 133 | TimeUnit.MILLISECONDS); |
| 134 | this.log.debug("Started discovery manager for switch {}", |
| 135 | sw.getId()); |
| 136 | |
| 137 | } |
| 138 | |
| 139 | /** |
| 140 | * Add physical port port to discovery process. |
| 141 | * Send out initial LLDP and label it as slow port. |
| 142 | * |
| 143 | * @param port the port |
| 144 | */ |
| 145 | public void addPort(final OFPortDesc port) { |
| 146 | // Ignore ports that are not on this switch, or already booted. */ |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 147 | this.ports.put(port.getPortNo().getPortNumber(), port); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 148 | synchronized (this) { |
| 149 | this.log.debug("sending init probe to port {}", |
| 150 | port.getPortNo().getPortNumber()); |
| 151 | OFPacketOut pkt; |
| 152 | |
| 153 | pkt = this.createLLDPPacketOut(port); |
| 154 | this.sw.sendMsg(pkt); |
| 155 | if (useBDDP) { |
| 156 | OFPacketOut bpkt = this.createBDDPPacketOut(port); |
| 157 | this.sw.sendMsg(bpkt); |
| 158 | } |
| 159 | |
| 160 | this.slowPorts.add(port.getPortNo().getPortNumber()); |
| 161 | this.slowIterator = this.slowPorts.iterator(); |
| 162 | } |
| 163 | |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * Removes physical port from discovery process. |
| 168 | * |
| 169 | * @param port the port |
| 170 | */ |
alshabib | a159a32 | 2014-09-09 14:50:51 -0700 | [diff] [blame] | 171 | public void removePort(final OFPortDesc port) { |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 172 | // Ignore ports that are not on this switch |
| 173 | |
alshabib | a159a32 | 2014-09-09 14:50:51 -0700 | [diff] [blame] | 174 | int portnum = port.getPortNo().getPortNumber(); |
| 175 | this.ports.remove(portnum); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 176 | synchronized (this) { |
| 177 | if (this.slowPorts.contains(portnum)) { |
| 178 | this.slowPorts.remove(portnum); |
| 179 | this.slowIterator = this.slowPorts.iterator(); |
| 180 | |
| 181 | } else if (this.fastPorts.contains(portnum)) { |
| 182 | this.fastPorts.remove(portnum); |
| 183 | this.portProbeCount.remove(portnum); |
| 184 | // no iterator to update |
| 185 | } else { |
| 186 | this.log.warn( |
| 187 | "tried to dynamically remove non-existing port {}", |
| 188 | portnum); |
| 189 | } |
| 190 | } |
alshabib | c944fd0 | 2014-09-10 17:55:17 -0700 | [diff] [blame] | 191 | ConnectPoint cp = new ConnectPoint( |
tom | 782a7cf | 2014-09-11 23:58:38 -0700 | [diff] [blame] | 192 | DeviceId.deviceId(uri(sw.getId())), |
alshabib | c944fd0 | 2014-09-10 17:55:17 -0700 | [diff] [blame] | 193 | PortNumber.portNumber(port.getPortNo().getPortNumber())); |
| 194 | linkProvider.linksVanished(cp); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 195 | |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Method called by remote port to acknowledge receipt of LLDP sent by |
| 200 | * this port. If slow port, updates label to fast. If fast port, decrements |
| 201 | * number of unacknowledged probes. |
| 202 | * |
| 203 | * @param port the port |
| 204 | */ |
| 205 | public void ackProbe(final Integer port) { |
| 206 | final int portNumber = port; |
| 207 | synchronized (this) { |
| 208 | if (this.slowPorts.contains(portNumber)) { |
| 209 | this.log.debug("Setting slow port to fast: {}:{}", |
| 210 | this.sw.getId(), portNumber); |
| 211 | this.slowPorts.remove(portNumber); |
| 212 | this.slowIterator = this.slowPorts.iterator(); |
| 213 | this.fastPorts.add(portNumber); |
| 214 | this.portProbeCount.put(portNumber, new AtomicInteger(0)); |
| 215 | } else { |
| 216 | if (this.fastPorts.contains(portNumber)) { |
| 217 | this.portProbeCount.get(portNumber).set(0); |
| 218 | } else { |
| 219 | this.log.debug( |
| 220 | "Got ackProbe for non-existing port: {}", |
| 221 | portNumber); |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Creates packet_out LLDP for specified output port. |
| 229 | * |
| 230 | * @param port the port |
| 231 | * @return Packet_out message with LLDP data |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 232 | */ |
| 233 | private OFPacketOut createLLDPPacketOut(final OFPortDesc port) { |
| 234 | OFPacketOut.Builder packetOut = this.ofFactory.buildPacketOut(); |
| 235 | packetOut.setBufferId(OFBufferId.NO_BUFFER); |
| 236 | OFAction act = this.ofFactory.actions().buildOutput() |
| 237 | .setPort(port.getPortNo()).build(); |
| 238 | packetOut.setActions(Collections.singletonList(act)); |
| 239 | this.lldpPacket.setPort(port.getPortNo().getPortNumber()); |
| 240 | this.ethPacket.setSourceMACAddress(port.getHwAddr().getBytes()); |
| 241 | |
| 242 | final byte[] lldp = this.ethPacket.serialize(); |
| 243 | packetOut.setData(lldp); |
| 244 | return packetOut.build(); |
| 245 | } |
| 246 | |
| 247 | /** |
| 248 | * Creates packet_out BDDP for specified output port. |
| 249 | * |
| 250 | * @param port the port |
| 251 | * @return Packet_out message with LLDP data |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 252 | */ |
| 253 | private OFPacketOut createBDDPPacketOut(final OFPortDesc port) { |
| 254 | OFPacketOut.Builder packetOut = sw.factory().buildPacketOut(); |
| 255 | |
| 256 | packetOut.setBufferId(OFBufferId.NO_BUFFER); |
| 257 | |
| 258 | OFActionOutput.Builder act = sw.factory().actions().buildOutput() |
| 259 | .setPort(port.getPortNo()); |
| 260 | OFAction out = act.build(); |
| 261 | packetOut.setActions(Collections.singletonList(out)); |
| 262 | this.lldpPacket.setPort(port.getPortNo().getPortNumber()); |
| 263 | this.bddpEth.setSourceMACAddress(port.getHwAddr().getBytes()); |
| 264 | |
| 265 | final byte[] bddp = this.bddpEth.serialize(); |
| 266 | packetOut.setData(bddp); |
| 267 | |
| 268 | return packetOut.build(); |
| 269 | } |
| 270 | |
| 271 | |
| 272 | private void sendMsg(final OFMessage msg) { |
| 273 | this.sw.sendMsg(msg); |
| 274 | } |
| 275 | |
| 276 | public String getName() { |
| 277 | return "LinkDiscovery " + this.sw.getStringId(); |
| 278 | } |
| 279 | |
| 280 | /* |
| 281 | * Handles an incoming LLDP packet. Creates link in topology and sends ACK |
| 282 | * to port where LLDP originated. |
| 283 | */ |
alshabib | 505bc6b | 2014-09-09 15:04:13 -0700 | [diff] [blame] | 284 | public boolean handleLLDP(final byte[] pkt, Integer inPort) { |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 285 | |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 286 | short ethType = ONLabLddp.isOVXLLDP(pkt); |
| 287 | if (ethType == Ethernet.TYPE_LLDP || ethType == Ethernet.TYPE_BSN) { |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 288 | final Integer dstPort = inPort; |
| 289 | final DPIDandPort dp = ONLabLddp.parseLLDP(pkt); |
| 290 | final OpenFlowSwitch srcSwitch = ctrl.getSwitch(new Dpid(dp.getDpid())); |
| 291 | final Integer srcPort = dp.getPort(); |
| 292 | if (srcSwitch == null) { |
alshabib | 505bc6b | 2014-09-09 15:04:13 -0700 | [diff] [blame] | 293 | return true; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 294 | } |
| 295 | this.ackProbe(srcPort); |
| 296 | ConnectPoint src = new ConnectPoint( |
tom | 782a7cf | 2014-09-11 23:58:38 -0700 | [diff] [blame] | 297 | DeviceId.deviceId(uri(srcSwitch.getId())), |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 298 | PortNumber.portNumber(srcPort)); |
| 299 | |
| 300 | ConnectPoint dst = new ConnectPoint( |
tom | 782a7cf | 2014-09-11 23:58:38 -0700 | [diff] [blame] | 301 | DeviceId.deviceId(uri(sw.getId())), |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 302 | PortNumber.portNumber(dstPort)); |
| 303 | LinkDescription ld; |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 304 | if (ethType == Ethernet.TYPE_BSN) { |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 305 | ld = new DefaultLinkDescription(src, dst, Type.INDIRECT); |
| 306 | } else { |
| 307 | ld = new DefaultLinkDescription(src, dst, Type.DIRECT); |
| 308 | } |
| 309 | linkProvider.linkDetected(ld); |
alshabib | 505bc6b | 2014-09-09 15:04:13 -0700 | [diff] [blame] | 310 | return true; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 311 | } else { |
| 312 | this.log.debug("Ignoring unknown LLDP"); |
alshabib | 505bc6b | 2014-09-09 15:04:13 -0700 | [diff] [blame] | 313 | return false; |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 314 | } |
| 315 | } |
| 316 | |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 317 | private OFPortDesc findPort(Integer inPort) { |
| 318 | return ports.get(inPort); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | /** |
| 322 | * Execute this method every t milliseconds. Loops over all ports |
| 323 | * labeled as fast and sends out an LLDP. Send out an LLDP on a single slow |
| 324 | * port. |
| 325 | * |
| 326 | * @param t timeout |
| 327 | * @throws Exception |
| 328 | */ |
| 329 | @Override |
| 330 | public void run(final Timeout t) { |
| 331 | this.log.debug("sending probes"); |
| 332 | synchronized (this) { |
| 333 | final Iterator<Integer> fastIterator = this.fastPorts.iterator(); |
| 334 | while (fastIterator.hasNext()) { |
| 335 | final Integer portNumber = fastIterator.next(); |
| 336 | final int probeCount = this.portProbeCount.get(portNumber) |
| 337 | .getAndIncrement(); |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 338 | OFPortDesc port = findPort(portNumber); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 339 | if (probeCount < LinkDiscovery.MAX_PROBE_COUNT) { |
| 340 | this.log.debug("sending fast probe to port"); |
| 341 | |
| 342 | OFPacketOut pkt = this.createLLDPPacketOut(port); |
| 343 | this.sendMsg(pkt); |
| 344 | if (useBDDP) { |
| 345 | OFPacketOut bpkt = this.createBDDPPacketOut(port); |
| 346 | this.sendMsg(bpkt); |
| 347 | } |
| 348 | } else { |
| 349 | // Update fast and slow ports |
| 350 | fastIterator.remove(); |
| 351 | this.slowPorts.add(portNumber); |
| 352 | this.slowIterator = this.slowPorts.iterator(); |
| 353 | this.portProbeCount.remove(portNumber); |
| 354 | |
| 355 | // Remove link from topology |
| 356 | final OFPortDesc srcPort = port; |
| 357 | |
| 358 | ConnectPoint cp = new ConnectPoint( |
tom | 782a7cf | 2014-09-11 23:58:38 -0700 | [diff] [blame] | 359 | DeviceId.deviceId(uri(sw.getId())), |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 360 | PortNumber.portNumber(srcPort.getPortNo().getPortNumber())); |
| 361 | linkProvider.linksVanished(cp); |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | // send a probe for the next slow port |
| 366 | if (this.slowPorts.size() > 0) { |
| 367 | if (!this.slowIterator.hasNext()) { |
| 368 | this.slowIterator = this.slowPorts.iterator(); |
| 369 | } |
| 370 | if (this.slowIterator.hasNext()) { |
| 371 | final int portNumber = this.slowIterator.next(); |
| 372 | this.log.debug("sending slow probe to port {}", portNumber); |
alshabib | 9ee6817 | 2014-09-09 14:45:14 -0700 | [diff] [blame] | 373 | OFPortDesc port = findPort(portNumber); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 374 | |
| 375 | OFPacketOut pkt = this.createLLDPPacketOut(port); |
| 376 | this.sendMsg(pkt); |
| 377 | if (useBDDP) { |
| 378 | OFPacketOut bpkt = this.createBDDPPacketOut(port); |
| 379 | this.sendMsg(bpkt); |
| 380 | } |
| 381 | |
| 382 | } |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | // reschedule timer |
alshabib | c944fd0 | 2014-09-10 17:55:17 -0700 | [diff] [blame] | 387 | timeout = Timer.getTimer().newTimeout(this, this.probeRate, |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 388 | TimeUnit.MILLISECONDS); |
| 389 | } |
| 390 | |
| 391 | public void removeAllPorts() { |
alshabib | c944fd0 | 2014-09-10 17:55:17 -0700 | [diff] [blame] | 392 | for (OFPortDesc port : ports.values()) { |
alshabib | a159a32 | 2014-09-09 14:50:51 -0700 | [diff] [blame] | 393 | removePort(port); |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 394 | } |
| 395 | } |
| 396 | |
alshabib | c944fd0 | 2014-09-10 17:55:17 -0700 | [diff] [blame] | 397 | public void stop() { |
| 398 | removeAllPorts(); |
| 399 | timeout.cancel(); |
| 400 | } |
| 401 | |
alshabib | df652ad | 2014-09-09 11:53:19 -0700 | [diff] [blame] | 402 | } |