Committed by
li shuai
[ONOS-2833] Define a DnatService interface providing the rules in DNAT
table. Change-Id: I9133f4387fce0025797d9eea9744e8268ed851d4
Showing
1 changed file
with
46 additions
and
0 deletions
| 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 | + * DnatService interface provides the rules in DNAT table which is Table(20) for ovs pipeline. | ||
| 26 | + * DNAT means Destination Network Address Translation, it is acronym for network terminology. | ||
| 27 | + * Handle the downward flows. | ||
| 28 | + */ | ||
| 29 | +public interface DnatService { | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * Assemble the DNAT table rules. | ||
| 33 | + * Match: ipv4 type and destination ip. | ||
| 34 | + * Action: set eth_src, set ip_dst, set vnid and goto L3Forward Table(30). | ||
| 35 | + * | ||
| 36 | + * @param deviceId Device Id | ||
| 37 | + * @param dstIp floating ip | ||
| 38 | + * @param ethSrc floating ip gateway mac | ||
| 39 | + * @param ipDst destination vm ip | ||
| 40 | + * @param actionVni the vni of L3 network | ||
| 41 | + * @param type the operation type of the flow rules | ||
| 42 | + */ | ||
| 43 | + void programRules(DeviceId deviceId, IpAddress dstIp, | ||
| 44 | + MacAddress ethSrc, IpAddress ipDst, | ||
| 45 | + SegmentationId actionVni, Objective.Operation type); | ||
| 46 | +} |
-
Please register or login to post a comment