lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 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; |
lishuai | 404b0fc | 2015-12-04 09:59:59 +0800 | [diff] [blame] | 20 | |
lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 21 | import org.onosproject.net.DeviceId; |
lishuai | 404b0fc | 2015-12-04 09:59:59 +0800 | [diff] [blame] | 22 | import org.onosproject.net.driver.DriverHandler; |
lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 23 | import org.onosproject.net.flowobjective.Objective; |
| 24 | import org.onosproject.vtnrsc.SegmentationId; |
| 25 | |
lishuai | 404b0fc | 2015-12-04 09:59:59 +0800 | [diff] [blame] | 26 | |
lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 27 | /** |
| 28 | * ArpService interface providing the rules in ARP table which is Table(10). |
| 29 | */ |
| 30 | public interface ArpService { |
| 31 | |
| 32 | /** |
| 33 | * Assemble the arp rules. |
| 34 | * Match: arp type, vnid and destination ip. |
| 35 | * Action: set arp_operation, move arp_eth_src to arp_eth_dst, set arp_eth_src, |
| 36 | * move arp_ip_src to arp_ip_dst, set arp_ip_src, set output port. |
| 37 | * |
lishuai | 404b0fc | 2015-12-04 09:59:59 +0800 | [diff] [blame] | 38 | * @param hander DriverHandler |
lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 39 | * @param deviceId Device Id |
| 40 | * @param dstIP destination ip |
| 41 | * @param matchVni the vni of the source network (l2vni) |
| 42 | * @param dstMac destination mac |
| 43 | * @param type the operation type of the flow rules |
| 44 | */ |
lishuai | 404b0fc | 2015-12-04 09:59:59 +0800 | [diff] [blame] | 45 | void programArpRules(DriverHandler hander, DeviceId deviceId, IpAddress dstIP, |
lishuai | 4128225 | 2015-11-20 15:16:15 +0800 | [diff] [blame] | 46 | SegmentationId matchVni, MacAddress dstMac, |
| 47 | Objective.Operation type); |
| 48 | } |