blob: ea92134747e65053bf03a1703c8d56adeb172d0b [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska83e090e2014-10-22 14:25:35 -070015 */
alshabib55a55d92014-09-16 11:59:31 -070016package org.onlab.onos.net.flow.instructions;
tom8bb16062014-09-12 14:47:46 -070017
18/**
19 * Abstraction of a single traffic treatment step.
20 */
alshabib030111e2014-09-15 15:56:42 -070021public interface Instruction {
tom8bb16062014-09-12 14:47:46 -070022
23 /**
24 * Represents the type of traffic treatment.
25 */
26 public enum Type {
27 /**
28 * Signifies that the traffic should be dropped.
29 */
30 DROP,
31
32 /**
33 * Signifies that the traffic should be output to a port.
34 */
35 OUTPUT,
36
37 /**
38 * Signifies that.... (do we need this?)
39 */
40 GROUP,
41
42 /**
Marc De Leenheer49087752014-10-23 13:54:09 -070043 * Signifies that the traffic should be modified in L0 way.
44 */
45 L0MODIFICATION,
46
47 /**
alshabib35edb1a2014-09-16 17:44:44 -070048 * Signifies that the traffic should be modified in L2 way.
tom8bb16062014-09-12 14:47:46 -070049 */
alshabib35edb1a2014-09-16 17:44:44 -070050 L2MODIFICATION,
51
52 /**
53 * Signifies that the traffic should be modified in L3 way.
54 */
55 L3MODIFICATION
tom8bb16062014-09-12 14:47:46 -070056 }
57
58 // TODO: Create factory class 'Instructions' that will have various factory
59 // to create specific instructions.
60
alshabib1d4cace2014-09-13 19:16:26 -070061 /**
alshabib89e43ef2014-09-16 10:36:34 -070062 * Returns the type of instruction.
alshabib1d4cace2014-09-13 19:16:26 -070063 * @return type of instruction
64 */
65 public Type type();
66
tom8bb16062014-09-12 14:47:46 -070067}