public final class ArpResponderUtil extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ArpResponderUtil.TriFunction<T,U,S,R>
A Interface that represent lambda TriFunction.
|
Modifier and Type | Method and Description |
---|---|
static org.opendaylight.genius.mdsalutil.FlowEntity |
createArpDefaultFlow(BigInteger dpId,
short tableId,
int arpOpType,
Supplier<List<org.opendaylight.genius.mdsalutil.MatchInfo>> matches,
Supplier<List<org.opendaylight.genius.mdsalutil.ActionInfo>> actions) |
static BigInteger |
generateCookie(int lportTag,
String ipAddress)
Generate Cookie per flow.
|
static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> |
getActions(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
String ifName,
String ipAddress,
String macAddress,
boolean isTunnelInterface)
Get List of actions for ARP Responder Flows.
|
static org.opendaylight.genius.mdsalutil.FlowEntity |
getArpResponderTableMissFlow(BigInteger dpnId)
Get Default ARP Responder Drop flow on the DPN.
|
static List<org.opendaylight.genius.mdsalutil.BucketInfo> |
getDefaultBucketInfos(short resubmitTableId,
short resubmitTableId2)
Get Bucket Actions for ARP Responder Group Flow.
|
static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> |
getEgressActionsForInterface(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
String ifName,
int actionCounter,
boolean isTunnelInterface)
Get List of Egress Action for the VPN interface.
|
static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> |
getExtInterfaceInstructions(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
String extInterfaceName,
String ipAddress,
String macAddress)
Get instruction list for ARP responder flows originated from ext-net e.g.
|
static String |
getFlowId(int lportTag,
String ipAdress)
Creates Uniquely Identifiable flow Id.
|
static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> |
getInterfaceInstructions(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService,
String interfaceName,
String ipAddress,
String macAddress,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService)
Get instruction list for ARP responder flows.
|
static List<org.opendaylight.genius.mdsalutil.MatchInfo> |
getMatchCriteria(int lportTag,
ElanInstance elanInstance,
String ipAddress)
Get Match Criteria for the ARP Responder Flow.
|
static void |
installFlow(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdSalManager,
BigInteger dpnId,
String flowId,
String flowName,
int priority,
BigInteger cookie,
List<org.opendaylight.genius.mdsalutil.MatchInfo> matches,
List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
Install ARP Responder FLOW.
|
static void |
installGroup(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdSalManager,
BigInteger dpnId,
long groupdId,
String groupName,
List<org.opendaylight.genius.mdsalutil.BucketInfo> buckets)
Install Group flow on the DPN.
|
static void |
removeFlow(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdSalManager,
BigInteger dpnId,
String flowId)
Remove flow form DPN.
|
static Long |
retrieveStandardArpResponderGroupId(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager)
Uses the IdManager to retrieve ARP Responder GroupId from ELAN pool.
|
public static void installGroup(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdSalManager, BigInteger dpnId, long groupdId, String groupName, List<org.opendaylight.genius.mdsalutil.BucketInfo> buckets)
mdSalManager
- Reference of MDSAL API RPC that provides API for installing
group flowdpnId
- DPN on which group flow to be installedgroupdId
- Uniquely identifiable Group Id for the group flowgroupName
- Name of the group flowbuckets
- List of the bucket actions for the group flowpublic static org.opendaylight.genius.mdsalutil.FlowEntity getArpResponderTableMissFlow(BigInteger dpnId)
dpnId
- DPN on which group flow to be installedpublic static List<org.opendaylight.genius.mdsalutil.BucketInfo> getDefaultBucketInfos(short resubmitTableId, short resubmitTableId2)
Install Default Groups, Group has 3 Buckets
NwConstants.LPORT_DISPATCHER_TABLE
, for
ELAN flooding
NwConstants.ARP_RESPONDER_TABLE
, for ARP
Auto response from DPN itselfresubmitTableId
- Resubmit Flow Table IdresubmitTableId2
- Resubmit Flow Table Idpublic static List<org.opendaylight.genius.mdsalutil.MatchInfo> getMatchCriteria(int lportTag, ElanInstance elanInstance, String ipAddress)
List of Match Criteria for ARP Responder
NwConstants.L3VPN_SERVICE_INDEX
) Lport Tag
(MetaDataUtil.METADATA_MASK_LPORT_TAG
) and VRF
ID(MetaDataUtil.METADATA_MASK_VRFID
)lportTag
- LPort TagelanInstance
- Elan InstanceipAddress
- Ip Address to be matched to this flowpublic static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getActions(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, String ifName, String ipAddress, String macAddress, boolean isTunnelInterface)
Actions consists of all the ARP actions and Resubmit Action to table
NwConstants.ELAN_BASE_TABLE
such that packets can flow ELAN Rule
ipAddress
- IP Address for which ARP Response packet is to be generatedmacAddress
- MacAddress for which ARP Response packet is to be generatedpublic static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getInterfaceInstructions(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService, String interfaceName, String ipAddress, String macAddress, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService)
public static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getExtInterfaceInstructions(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, String extInterfaceName, String ipAddress, String macAddress)
public static void installFlow(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdSalManager, BigInteger dpnId, String flowId, String flowName, int priority, BigInteger cookie, List<org.opendaylight.genius.mdsalutil.MatchInfo> matches, List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
mdSalManager
- Reference of MDSAL API RPC that provides API for installing
flowdpnId
- DPN on which flow to be installedflowId
- Uniquely Identifiable Arp Responder Table flow IdflowName
- Readable flow namepriority
- Flow Prioritycookie
- Flow Cookiematches
- List of Match Criteria for the flowinstructions
- List of Instructions for the flowpublic static void removeFlow(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdSalManager, BigInteger dpnId, String flowId)
mdSalManager
- Reference of MDSAL API RPC that provides API for installing
flowdpnId
- DPN form which flow to be removedflowId
- Uniquely Identifiable Arp Responder Table flow Id that is to
be removedpublic static String getFlowId(int lportTag, String ipAdress)
lportTag
- LportTag of the flowipAdress
- Gateway IP for which ARP Response flow to be installedArpResponderConstant.FLOW_ID_FORMAT_WITH_LPORT
,
ArpResponderConstant.FLOW_ID_FORMAT_WITHOUT_LPORT
public static BigInteger generateCookie(int lportTag, String ipAddress)
Cookie is generated by Summation of
NwConstants.COOKIE_ARP_RESPONDER
+ 1 + lportTag + Gateway IP
lportTag
- Lport Tag of the flowipAddress
- Gateway IP for which ARP Response flow to be installedpublic static org.opendaylight.genius.mdsalutil.FlowEntity createArpDefaultFlow(BigInteger dpId, short tableId, int arpOpType, Supplier<List<org.opendaylight.genius.mdsalutil.MatchInfo>> matches, Supplier<List<org.opendaylight.genius.mdsalutil.ActionInfo>> actions)
public static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getEgressActionsForInterface(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager ifaceMgrRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, String ifName, int actionCounter, boolean isTunnelInterface)
ifaceMgrRpcService
- Interface Manager RPC reference that invokes API to retrieve
Egress ActionifName
- VPN Interface for which Egress Action to be retrievedactionCounter
- Action Keypublic static Long retrieveStandardArpResponderGroupId(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager)
idManager
- the id managerCopyright © 2019 OpenDaylight. All rights reserved.