blob: 278492ade01f4ff07e03afa50637bf32863ad8d2 [file] [log] [blame]
Hyunsun Moon2c3f0ee2017-04-06 16:47:21 +09001/*
2 * Copyright 2017-present Open Networking Laboratory
3 *
4 * 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
7 *
8 * 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.
15 */
16package org.opencord.cordvtn.api.core;
17
18import org.onlab.packet.VlanId;
19import org.onosproject.net.flow.FlowRule;
20import org.opencord.cordvtn.api.node.CordVtnNode;
21
22/**
23 * Service providing cordvtn pipeline.
24 */
25public interface CordVtnPipeline {
26
27 // tables
28 int TABLE_ZERO = 0;
29 int TABLE_IN_PORT = 1;
30 int TABLE_ACCESS = 2;
31 int TABLE_IN_SERVICE = 3;
32 int TABLE_DST = 4;
33 int TABLE_TUNNEL_IN = 5;
34 int TABLE_VLAN = 6;
35
36 // priorities
37 int PRIORITY_MANAGEMENT = 55000;
38 int PRIORITY_HIGH = 50000;
39 int PRIORITY_DEFAULT = 5000;
40 int PRIORITY_LOW = 4000;
41 int PRIORITY_ZERO = 0;
42
43 VlanId VLAN_WAN = VlanId.vlanId((short) 500);
44
45 /**
46 * Initializes the pipeline for the supplied node.
47 *
48 * @param node cordvtn node
49 */
50 void initPipeline(CordVtnNode node);
51
52 /**
53 * Clean up the pipeline for all nodes.
54 */
55 void cleanupPipeline();
56
57 /**
58 * Processes the given flow rule.
59 *
60 * @param install install or remove
61 * @param rule flow rule to process
62 */
63 void processFlowRule(boolean install, FlowRule rule);
64}