Class ArpResponderHandler


  • @Singleton
    public class ArpResponderHandler
    extends java.lang.Object
    Class that is responsible for handling ARP Responder flows which involves to differentiate between router and connected mac cases, identify DPNs and installation and uninstallation of flows.
    • Constructor Summary

      Constructors 
      Constructor Description
      ArpResponderHandler​(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IElanService elanService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, VpnUtil vpnUtil)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addArpResponderFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, int lportTag, java.lang.String interfaceName, java.lang.String gatewayIp, java.lang.String mac)
      Add ARP Responder flow, by invoking ELan RPC service.
      com.google.common.base.Optional<java.lang.String> getGatewayMacAddressForInterface​(VpnPortipToPort gwPort, java.lang.String ifName)
      Get Mac address from given gateway port and interface name.
      void removeArpResponderFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, java.lang.String ifName, java.lang.String gatewayIp, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid subnetUuid)
      Remove ARP Responder flow when VM interface is removed, by invoking ELan RPC service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArpResponderHandler

        @Inject
        public ArpResponderHandler​(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
                                   IElanService elanService,
                                   org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
                                   org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
                                   VpnUtil vpnUtil)
        Constructor.
        Parameters:
        dataBroker - dataBroker
        elanService - elanService
        interfaceManager - interfaceManager
        itmRpcService - itmRpcService
        vpnUtil - vpnUtil
    • Method Detail

      • addArpResponderFlow

        public void addArpResponderFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                        int lportTag,
                                        java.lang.String interfaceName,
                                        java.lang.String gatewayIp,
                                        java.lang.String mac)
        Add ARP Responder flow, by invoking ELan RPC service.
        Parameters:
        dpnId - dpn Id on which ARP responder flow to be added
        lportTag - lport tag of the interface
        interfaceName - interface to which ARP responder flow to be added
        gatewayIp - gateway ip of the interface
        mac - mac address
      • removeArpResponderFlow

        public void removeArpResponderFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                           int lportTag,
                                           java.lang.String ifName,
                                           java.lang.String gatewayIp,
                                           org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid subnetUuid)
        Remove ARP Responder flow when VM interface is removed, by invoking ELan RPC service.
        Parameters:
        dpId - dpn Id on which ARP responder flow to be removed
        lportTag - lport tag of the interface
        ifName - interface to which ARP responder flow to be removed
        gatewayIp - subnet gateway ip
        subnetUuid - subnet Id of the interface
      • getGatewayMacAddressForInterface

        public com.google.common.base.Optional<java.lang.String> getGatewayMacAddressForInterface​(VpnPortipToPort gwPort,
                                                                                                  java.lang.String ifName)
        Get Mac address from given gateway port and interface name.
        Parameters:
        gwPort - gateway port
        ifName - interface for which gateway to be retrieved
        Returns:
        mac address if present else optional absent value