Charles Chan | 4793375 | 2017-11-30 15:37:50 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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.onosproject.net.host; |
| 17 | |
| 18 | import org.onosproject.net.ConnectPoint; |
| 19 | import org.onosproject.net.Host; |
| 20 | |
| 21 | public interface HostLocationProbingService { |
| 22 | /** |
| 23 | * Mode of host location probing. |
| 24 | */ |
| 25 | enum ProbeMode { |
| 26 | /** |
| 27 | * Append probed host location if reply is received before timeout. Otherwise, do nothing. |
| 28 | * Typically used to discover secondary locations. |
| 29 | */ |
| 30 | DISCOVER, |
| 31 | |
| 32 | /** |
| 33 | * Remove probed host location if reply is received after timeout. Otherwise, do nothing. |
| 34 | * Typically used to verify previous locations. |
| 35 | */ |
| 36 | VERIFY |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Probes given host on given location. |
| 41 | * |
| 42 | * @param host the host to be probed |
| 43 | * @param connectPoint the location of host to be probed |
| 44 | * @param probeMode probe mode |
| 45 | */ |
| 46 | void probeHostLocation(Host host, ConnectPoint connectPoint, ProbeMode probeMode); |
| 47 | |
| 48 | } |