2 * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.ovsdb.openstack.netvirt.api;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
14 import com.google.common.util.concurrent.ListenableFuture;
18 * @author Anil Vishnoi (avishnoi@Brocade.com)
22 public interface GatewayMacResolver {
25 * Method will trigger the mac resolution for gateway IP. If user set periodicRefresh to true,
26 * it will periodically trigger the gateway resolution after a specific time interval using the
27 * given source IP and MAC addresses. It will also cache the source IP and MAC in case of periodicRefresh.
28 * If periodicRefresh is false, it will just do one time gateway resolution and won't cache any internal data.
29 * If user call the same method with different source ip and mac address, GatewayMacResolver service will
30 * update the internally cached data with these new source ip and mac address and will use it as per
31 * periodicRefresh flag.
32 * @param externalNetworkBridgeDpid This bridge will be used for sending ARP request
33 * @param gatewayIp ARP request will be send for this ip address
34 * @param periodicRefresh Do you want to periodically refresh the gateway mac?
37 public ListenableFuture<MacAddress> resolveMacAddress( final Long externalNetworkBridgeDpid, final Ipv4Address gatewayIp,
38 final Ipv4Address sourceIpAddress, final MacAddress sourceMacAddress, final Boolean periodicRefresh);
41 * Method will stop the periodic refresh of the given gateway ip address.
44 public void stopPeriodicRefresh(final Ipv4Address gatewayIp);