@VisibleForTesting IpSpace computeInterfaceArpReplies( Interface iface, IpSpace routableIpsForThisVrf, IpSpace ipsRoutedThroughInterface) { IpSpace ipsAssignedToThisInterface = computeIpsAssignedToThisInterface(iface); if (ipsAssignedToThisInterface == EmptyIpSpace.INSTANCE) { // if no IPs are assigned to this interface, it replies to no ARP requests. return EmptyIpSpace.INSTANCE; } /* Accept IPs assigned to this interface */ AclIpSpace.Builder interfaceArpReplies = AclIpSpace.permitting(ipsAssignedToThisInterface); if (iface.getProxyArp()) { /* Reject IPs routed through this interface */ interfaceArpReplies.thenRejecting(ipsRoutedThroughInterface); /* Accept all other routable IPs */ interfaceArpReplies.thenPermitting(routableIpsForThisVrf); } return interfaceArpReplies.build(); }
ImmutableMap.of( P1, AclIpSpace.permitting(P1.toIpSpace()).build(), P2, AclIpSpace.permitting(P2.toIpSpace()).build())) .build(); SortedMap<String, SortedMap<String, GenericRib<AbstractRoute>>> ribs =
ImmutableMap.of( i2.getName(), AclIpSpace.permitting(i2Ip.toIpSpace()) .thenPermitting(P1.getEndIp().toIpSpace()) .build()));
IpWildcardSetIpSpace.builder().including(ipWildcard1, ipWildcard2, ipWildcard3).build(); IpSpace aclIpSpace1 = AclIpSpace.permitting(ipWildcardSetIpSpace) .thenPermitting(ipIpSpace) .thenPermitting(prefixIpSpace)