blob: a19d06a151f369d90c97a22dc900d9a52036a9da [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Ray Milkey34c95902015-04-15 09:47:53 -07002 * Copyright 2014-2015 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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.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 */
Sho SHIMIZUd1506202015-05-05 10:43:08 -070026 enum Type {
tom8bb16062014-09-12 14:47:46 -070027 /**
28 * Signifies that the traffic should be dropped.
Ray Milkeyea125322016-02-16 13:35:09 -080029 * @deprecated 1.4.0 Emu Release
tom8bb16062014-09-12 14:47:46 -070030 */
Charles Chan7efabeb2015-09-28 15:12:19 -070031 @Deprecated
tom8bb16062014-09-12 14:47:46 -070032 DROP,
33
34 /**
Charles Chan7efabeb2015-09-28 15:12:19 -070035 * Signifies that the traffic requires no action.
36 *
37 * In OF10, the behavior of NOACTION is DROP.
38 * In OF13, the behavior depends on current Action Set.
39 */
40 NOACTION,
41
42 /**
tom8bb16062014-09-12 14:47:46 -070043 * Signifies that the traffic should be output to a port.
44 */
45 OUTPUT,
46
47 /**
Saurav Das86af8f12015-05-25 23:55:33 -070048 * Signifies that traffic should be sent out of a group.
tom8bb16062014-09-12 14:47:46 -070049 */
50 GROUP,
51
52 /**
Steffen Gebertbbfdaaa2015-09-29 11:01:46 +020053 * Signifies that the traffic should be enqueued to an already-configured
54 queue on a port.
55 */
56 QUEUE,
57
58 /**
alshabib10c810b2015-08-18 16:59:04 -070059 * Signifies that traffic should be metered according to a meter.
60 */
61 METER,
62
63 /**
Marc De Leenheer49087752014-10-23 13:54:09 -070064 * Signifies that the traffic should be modified in L0 way.
65 */
66 L0MODIFICATION,
67
68 /**
Yafit Hadar52d81552015-10-07 12:26:52 +030069 * Signifies that the traffic should be modified in L1 way.
70 */
71 L1MODIFICATION,
72
73 /**
alshabib35edb1a2014-09-16 17:44:44 -070074 * Signifies that the traffic should be modified in L2 way.
tom8bb16062014-09-12 14:47:46 -070075 */
alshabib35edb1a2014-09-16 17:44:44 -070076 L2MODIFICATION,
77
78 /**
alshabib9af70072015-02-09 14:34:16 -080079 * Signifies that the traffic should be passed to another table.
80 */
81 TABLE,
82
83 /**
alshabib35edb1a2014-09-16 17:44:44 -070084 * Signifies that the traffic should be modified in L3 way.
85 */
Saurav Das86af8f12015-05-25 23:55:33 -070086 L3MODIFICATION,
87
88 /**
89 * Signifies that metadata be attached to traffic.
90 */
Hyunsun Moon9fed5282015-07-16 17:55:22 -070091 METADATA,
92
93 /**
94 * Signifies that the traffic should be modified in L4 way.
95 */
Jonathan Hart3c259162015-10-21 21:31:19 -070096 L4MODIFICATION,
97
98 /**
99 * Signifies that an extension instruction will be used.
100 */
101 EXTENSION
tom8bb16062014-09-12 14:47:46 -0700102 }
103
alshabib1d4cace2014-09-13 19:16:26 -0700104 /**
alshabib89e43ef2014-09-16 10:36:34 -0700105 * Returns the type of instruction.
Yafit Hadar52d81552015-10-07 12:26:52 +0300106 *
alshabib1d4cace2014-09-13 19:16:26 -0700107 * @return type of instruction
108 */
Sho SHIMIZUd1506202015-05-05 10:43:08 -0700109 Type type();
alshabib1d4cace2014-09-13 19:16:26 -0700110
tom8bb16062014-09-12 14:47:46 -0700111}