lishuai
Committed by li shuai

[ONOS-2834] Define a L3ForwardService interface providing the rules in

L3Forward table.

Change-Id: I49097305985add091a85b655257d772b5b71e667
1 +/*
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 + */
16 +package org.onosproject.vtn.table;
17 +
18 +import org.onlab.packet.IpAddress;
19 +import org.onlab.packet.MacAddress;
20 +import org.onosproject.net.DeviceId;
21 +import org.onosproject.net.flowobjective.Objective;
22 +import org.onosproject.vtnrsc.SegmentationId;
23 +
24 +/**
25 + * L3ForwardService interface provide the rules in L3Forward table which is Table(30).
26 + */
27 +public interface L3ForwardService {
28 +
29 + /**
30 + * Assemble the L3Forward table rules.
31 + * Match: ipv4 type, vnid and destination ip.
32 + * Action: set eth_src, set eth_dst, set vnid and goto L2Forward Table(50).
33 + *
34 + * @param deviceId Device Id
35 + * @param l3Vni the vni of L3 network
36 + * @param dstVmIP destination vm ip
37 + * @param dstVni the vni of the destination network (l2vni)
38 + * @param dstVmGwMac destination VM gateway mac
39 + * @param dstVmMac destination VM mac
40 + * @param type the operation type of the flow rules
41 + */
42 + void programRouteRules(DeviceId deviceId, SegmentationId l3Vni,
43 + IpAddress dstVmIP, SegmentationId dstVni,
44 + MacAddress dstVmGwMac, MacAddress dstVmMac,
45 + Objective.Operation type);
46 +
47 +}