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