blob: 9b578b607dfe8d64ed2d1f682d4ae1d1738c15a0 [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
alshabib55a55d92014-09-16 11:59:31 -070019package org.onlab.onos.net.flow.instructions;
tom8bb16062014-09-12 14:47:46 -070020
21/**
22 * Abstraction of a single traffic treatment step.
23 */
alshabib030111e2014-09-15 15:56:42 -070024public interface Instruction {
tom8bb16062014-09-12 14:47:46 -070025
26 /**
27 * Represents the type of traffic treatment.
28 */
29 public enum Type {
30 /**
31 * Signifies that the traffic should be dropped.
32 */
33 DROP,
34
35 /**
36 * Signifies that the traffic should be output to a port.
37 */
38 OUTPUT,
39
40 /**
41 * Signifies that.... (do we need this?)
42 */
43 GROUP,
44
45 /**
Marc De Leenheer49087752014-10-23 13:54:09 -070046 * Signifies that the traffic should be modified in L0 way.
47 */
48 L0MODIFICATION,
49
50 /**
alshabib35edb1a2014-09-16 17:44:44 -070051 * Signifies that the traffic should be modified in L2 way.
tom8bb16062014-09-12 14:47:46 -070052 */
alshabib35edb1a2014-09-16 17:44:44 -070053 L2MODIFICATION,
54
55 /**
56 * Signifies that the traffic should be modified in L3 way.
57 */
58 L3MODIFICATION
tom8bb16062014-09-12 14:47:46 -070059 }
60
61 // TODO: Create factory class 'Instructions' that will have various factory
62 // to create specific instructions.
63
alshabib1d4cace2014-09-13 19:16:26 -070064 /**
alshabib89e43ef2014-09-16 10:36:34 -070065 * Returns the type of instruction.
alshabib1d4cace2014-09-13 19:16:26 -070066 * @return type of instruction
67 */
68 public Type type();
69
tom8bb16062014-09-12 14:47:46 -070070}