blob: d9c7c16767a4b14a2f2d7d473b8c8b567fef4fff [file] [log] [blame]
Charles Chanff79dd92018-06-01 16:33:48 -07001/*
2 * Copyright 2014-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 */
16package org.onosproject.net.host;
17
18import org.onlab.packet.MacAddress;
19import org.onosproject.net.ConnectPoint;
20import org.onosproject.net.Host;
21import org.onosproject.net.provider.ProviderService;
22
23/**
24 * Means of conveying host probing information to the core.
25 */
26public interface HostProbingProviderService extends ProviderService<HostProbingProvider> {
27
28 /**
29 * Notifies HostProbeStore the beginning of pending host location verification and
30 * retrieves the unique MAC address for the probe.
31 *
32 * @param host host to be probed
33 * @param connectPoint the connect point that is under verification
34 * @param probeMode probe mode
35 * @param probeMac probeMac if this is a retry.
36 * Null if this is the very first probe and the probeMac is to-be-generated
37 * @param retry max retry times
38 * @return probeMac, the source MAC address ONOS uses to probe the host
39 */
40 MacAddress addProbingHost(Host host, ConnectPoint connectPoint, ProbeMode probeMode,
41 MacAddress probeMac, int retry);
42
43 /**
44 * Notifies HostProbeStore the end of pending host location verification.
45 *
46 * @param probeMac the source MAC address ONOS uses to probe the host
47 */
48 void removeProbingHost(MacAddress probeMac);
49}