Hyunsun Moon | 90163ba | 2016-10-12 13:35:14 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame^] | 2 | * Copyright 2017-present Open Networking Foundation |
Hyunsun Moon | 90163ba | 2016-10-12 13:35:14 -0700 | [diff] [blame] | 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.ofagent.api; |
| 17 | |
Daniel Park | be6b673 | 2016-11-11 15:52:19 +0900 | [diff] [blame] | 18 | import org.projectfloodlight.openflow.protocol.OFCapabilities; |
| 19 | |
| 20 | import java.util.Set; |
| 21 | |
Hyunsun Moon | 90163ba | 2016-10-12 13:35:14 -0700 | [diff] [blame] | 22 | /** |
| 23 | * Representation of capabilities of a virtual OpenFlow switch. |
| 24 | */ |
| 25 | public interface OFSwitchCapabilities { |
| 26 | |
Daniel Park | be6b673 | 2016-11-11 15:52:19 +0900 | [diff] [blame] | 27 | /** |
| 28 | * Returns the capabilities of the switch. |
| 29 | * |
| 30 | * @return capabilities |
| 31 | */ |
| 32 | Set<OFCapabilities> ofSwitchCapabilities(); |
| 33 | |
| 34 | interface Builder { |
| 35 | |
| 36 | /** |
| 37 | * Builds a OFSwitchCapabilities object. |
| 38 | * |
| 39 | * @return OFSwitchCapabilities |
| 40 | */ |
| 41 | OFSwitchCapabilities build(); |
| 42 | |
| 43 | /** |
| 44 | * Enable OFPC_FLOW_STATS capability. |
| 45 | * |
| 46 | * @return Builder object |
| 47 | */ |
| 48 | Builder flowStats(); |
| 49 | |
| 50 | /** |
| 51 | * Enable OFPC_TABLE_STATS capability. |
| 52 | * |
| 53 | * @return Builder object |
| 54 | */ |
| 55 | Builder tableStats(); |
| 56 | |
| 57 | /** |
| 58 | * Enable OFPC_PORT_STATS capability. |
| 59 | * |
| 60 | * @return Builder object |
| 61 | */ |
| 62 | Builder portStats(); |
| 63 | |
| 64 | /** |
| 65 | * Enable OFPC_GROUP_STATS capability. |
| 66 | * |
| 67 | * @return Builder object |
| 68 | */ |
| 69 | Builder groupStats(); |
| 70 | |
| 71 | /** |
| 72 | * Enable OFPC_IP_REASM capability. |
| 73 | * |
| 74 | * @return Builder object |
| 75 | */ |
| 76 | Builder ipReasm(); |
| 77 | |
| 78 | /** |
| 79 | * Enable OFPC_QUEUE_STATS capability. |
| 80 | * |
| 81 | * @return Builder object |
| 82 | */ |
| 83 | Builder queueStats(); |
| 84 | |
| 85 | /** |
| 86 | * Enable OFPC_PORT_BLOCKED capability. |
| 87 | * |
| 88 | * @return Builder object |
| 89 | */ |
| 90 | Builder portBlocked(); |
| 91 | } |
| 92 | |
Hyunsun Moon | 90163ba | 2016-10-12 13:35:14 -0700 | [diff] [blame] | 93 | } |