alshabib | 55a55d9 | 2014-09-16 11:59:31 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow.instructions; |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 2 | |
| 3 | /** |
| 4 | * Abstraction of a single traffic treatment step. |
| 5 | */ |
alshabib | 030111e | 2014-09-15 15:56:42 -0700 | [diff] [blame] | 6 | public interface Instruction { |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 7 | |
| 8 | /** |
| 9 | * Represents the type of traffic treatment. |
| 10 | */ |
| 11 | public enum Type { |
| 12 | /** |
| 13 | * Signifies that the traffic should be dropped. |
| 14 | */ |
| 15 | DROP, |
| 16 | |
| 17 | /** |
| 18 | * Signifies that the traffic should be output to a port. |
| 19 | */ |
| 20 | OUTPUT, |
| 21 | |
| 22 | /** |
| 23 | * Signifies that.... (do we need this?) |
| 24 | */ |
| 25 | GROUP, |
| 26 | |
| 27 | /** |
alshabib | 35edb1a | 2014-09-16 17:44:44 -0700 | [diff] [blame] | 28 | * Signifies that the traffic should be modified in L2 way. |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 29 | */ |
alshabib | 35edb1a | 2014-09-16 17:44:44 -0700 | [diff] [blame] | 30 | L2MODIFICATION, |
| 31 | |
| 32 | /** |
| 33 | * Signifies that the traffic should be modified in L3 way. |
| 34 | */ |
| 35 | L3MODIFICATION |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | // TODO: Create factory class 'Instructions' that will have various factory |
| 39 | // to create specific instructions. |
| 40 | |
alshabib | 1d4cace | 2014-09-13 19:16:26 -0700 | [diff] [blame] | 41 | /** |
alshabib | 89e43ef | 2014-09-16 10:36:34 -0700 | [diff] [blame] | 42 | * Returns the type of instruction. |
alshabib | 1d4cace | 2014-09-13 19:16:26 -0700 | [diff] [blame] | 43 | * @return type of instruction |
| 44 | */ |
| 45 | public Type type(); |
| 46 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 47 | } |