class ForwardingAnalysisImpl implements ForwardingAnalysis, Serializable {

  @VisibleForTesting
  static Map<String, IpSpace> computeArpRepliesByInterface(
      Map<String, Interface> interfaces,
      Map<String, IpSpace> routableIpsByVrf,
      Map<String, Map<String, IpSpace>> ipsRoutedOutInterfaces,
      Map<String, Map<String, Set<Ip>>> interfaceOwnedIps) {
    return toImmutableMap(
        interfaces,
        Entry::getKey,
        ifaceEntry ->
            computeInterfaceArpReplies(
                ifaceEntry.getValue(),
                /* We believe at this time that an interface would send an ARP reply only based
                 * on the routes in it's own VRF.
                 * This type of routing separation is the point of VRFs, and cross-VRF introspection
                 * for the purposes of ARP replies is unlikely to happen by default.
                 */
                routableIpsByVrf.get(ifaceEntry.getValue().getVrfName()),
                ipsRoutedOutInterfaces
                    .get(ifaceEntry.getValue().getVrfName())
                    .getOrDefault(ifaceEntry.getKey(), EmptyIpSpace.INSTANCE),
                interfaceOwnedIps));
  }

  public  ForwardingAnalysisImpl(
      Map<String, Configuration> configurations,
      Map<String, Map<String, Fib>> fibs,
      Topology topology,
      Map<Location, LocationInfo> locationInfo);

}