blob: 84fcefb7fbf813f3b18d0e9b96e702b7e21db78a [file] [log] [blame]
lishuai6c56f5e2015-11-17 16:38:19 +08001/*
2 * Copyright 2015 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.onosproject.vtn.table;
17
18import org.onlab.packet.MacAddress;
19import org.onosproject.core.ApplicationId;
20import org.onosproject.net.DeviceId;
21import org.onosproject.net.PortNumber;
22import org.onosproject.net.flowobjective.Objective;
23import org.onosproject.vtnrsc.SegmentationId;
24
25/**
26 * Applies classifier flows to the device.
27 */
28public interface ClassifierService {
29
30 /**
31 * The port rule that message from host matches Table(0) Match: host mac and
32 * ingress port Action: set vnid and go to table(50).
33 *
34 * @param deviceId Device Id
35 * @param segmentationId the vnid of the host belong to
36 * @param inPort the ingress port of the host
37 * @param srcMac the mac of the host
38 * @param appId the application ID of the vtn
39 * @param type the operation of the flow
40 */
41 void programLocalIn(DeviceId deviceId, SegmentationId segmentationId,
42 PortNumber inPort, MacAddress srcMac,
43 ApplicationId appId, Objective.Operation type);
44
45 /**
46 * The port rule that message from tunnel Table(0) Match: tunnel port and
47 * vnid Action: go to table(50).
48 *
49 * @param deviceId Device Id
50 * @param segmentationId the vnid of the host belong to
51 * @param localTunnelPorts the tunnel pors of the device
52 * @param type the operation of the flow
53 */
54 void programTunnelIn(DeviceId deviceId, SegmentationId segmentationId,
55 Iterable<PortNumber> localTunnelPorts,
56 Objective.Operation type);
57
58}