Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -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 | |
| 17 | package org.onosproject.t3.api; |
| 18 | |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 19 | import org.onlab.packet.EthType; |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 20 | import org.onosproject.net.ConnectPoint; |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 21 | import org.onosproject.net.HostId; |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 22 | import org.onosproject.net.flow.TrafficSelector; |
| 23 | |
Andrea Campanella | 6be5c87 | 2018-02-21 14:28:20 +0100 | [diff] [blame^] | 24 | import java.util.List; |
| 25 | |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 26 | /** |
| 27 | * API for troubleshooting services, providing static analysis of installed |
| 28 | * flows and groups. |
| 29 | */ |
| 30 | public interface TroubleshootService { |
| 31 | |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 32 | /** |
Andrea Campanella | 6be5c87 | 2018-02-21 14:28:20 +0100 | [diff] [blame^] | 33 | * Requests a static trace be performed between all hosts in the network, given a type of traffic. |
| 34 | * |
| 35 | * @param type the etherType of the traffic we want to trace. |
| 36 | * @return a trace result |
| 37 | */ |
| 38 | List<StaticPacketTrace> pingAll(EthType.EtherType type); |
| 39 | |
| 40 | /** |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 41 | * Requests a static trace be performed between the two hosts in the network, given a type of traffic. |
| 42 | * |
| 43 | * @param sourceHost source host |
| 44 | * @param destinationHost destination host |
| 45 | * @param type the etherType of the traffic we want to trace. |
| 46 | * @return a trace result |
| 47 | */ |
| 48 | StaticPacketTrace trace(HostId sourceHost, HostId destinationHost, EthType.EtherType type); |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Requests a static trace be performed for the given traffic selector |
| 52 | * starting at the given connect point. |
| 53 | * |
| 54 | * @param packet description of packet |
Andrea Campanella | af34b7c | 2018-02-08 17:10:11 +0100 | [diff] [blame] | 55 | * @param in point at which packet starts |
Simon Hunt | 6fefd85 | 2017-11-13 17:09:43 -0800 | [diff] [blame] | 56 | * @return a trace result |
| 57 | */ |
| 58 | StaticPacketTrace trace(TrafficSelector packet, ConnectPoint in); |
| 59 | } |