blob: 8dad2bf2fbb04617ccf4e32a74b03b7687d621b2 [file] [log] [blame]
lishuai41282252015-11-20 15:16:15 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
lishuai41282252015-11-20 15:16:15 +08003 *
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.IpAddress;
19import org.onlab.packet.MacAddress;
lishuai404b0fc2015-12-04 09:59:59 +080020
lishuai41282252015-11-20 15:16:15 +080021import org.onosproject.net.DeviceId;
lishuai404b0fc2015-12-04 09:59:59 +080022import org.onosproject.net.driver.DriverHandler;
lishuai41282252015-11-20 15:16:15 +080023import org.onosproject.net.flowobjective.Objective;
24import org.onosproject.vtnrsc.SegmentationId;
25
lishuai404b0fc2015-12-04 09:59:59 +080026
lishuai41282252015-11-20 15:16:15 +080027/**
28 * ArpService interface providing the rules in ARP table which is Table(10).
29 */
30public 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 *
lishuai404b0fc2015-12-04 09:59:59 +080038 * @param hander DriverHandler
lishuai41282252015-11-20 15:16:15 +080039 * @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 */
lishuai404b0fc2015-12-04 09:59:59 +080045 void programArpRules(DriverHandler hander, DeviceId deviceId, IpAddress dstIP,
lishuai41282252015-11-20 15:16:15 +080046 SegmentationId matchVni, MacAddress dstMac,
47 Objective.Operation type);
48}