tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
| 3 | import org.onlab.onos.net.DeviceId; |
| 4 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 5 | /** |
| 6 | * Represents a generalized match & action pair to be applied to |
| 7 | * an infrastucture device. |
| 8 | */ |
| 9 | public interface FlowRule { |
| 10 | |
alshabib | 369d294 | 2014-09-12 17:59:35 -0700 | [diff] [blame] | 11 | //TODO: build cookie value |
| 12 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 13 | /** |
| 14 | * Returns the flow rule priority given in natural order; higher numbers |
| 15 | * mean higher priorities. |
| 16 | * |
| 17 | * @return flow rule priority |
| 18 | */ |
| 19 | int priority(); |
| 20 | |
| 21 | /** |
| 22 | * Returns the identity of the device where this rule applies. |
| 23 | * |
| 24 | * @return device identifier |
| 25 | */ |
| 26 | DeviceId deviceId(); |
| 27 | |
| 28 | /** |
| 29 | * Returns the traffic selector that identifies what traffic this |
| 30 | * rule should apply to. |
| 31 | * |
| 32 | * @return traffic selector |
| 33 | */ |
| 34 | TrafficSelector selector(); |
| 35 | |
| 36 | /** |
| 37 | * Returns the traffic treatment that applies to selected traffic. |
| 38 | * |
| 39 | * @return traffic treatment |
| 40 | */ |
alshabib | 369d294 | 2014-09-12 17:59:35 -0700 | [diff] [blame] | 41 | TrafficTreatment treatment(); |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 42 | |
| 43 | } |