blob: 5f44630414093b995e7b940836a46b30654d834e [file] [log] [blame]
tom8bb16062014-09-12 14:47:46 -07001package org.onlab.onos.net.flow;
2
3import org.onlab.onos.net.DeviceId;
4
tom8bb16062014-09-12 14:47:46 -07005/**
6 * Represents a generalized match & action pair to be applied to
7 * an infrastucture device.
8 */
9public interface FlowRule {
10
alshabib369d2942014-09-12 17:59:35 -070011 //TODO: build cookie value
12
tom8bb16062014-09-12 14:47:46 -070013 /**
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 */
alshabib369d2942014-09-12 17:59:35 -070041 TrafficTreatment treatment();
tom8bb16062014-09-12 14:47:46 -070042
43}