@Test public void testRequiredTransitNodes_withTransitNodeConstraint() throws IOException { SortedMap<String, Configuration> configs = makeRequiredTransitNodesNetwork(); Batfish batfish = getBatfish(configs, temp); batfish.computeDataPlane(batfish.getSnapshot()); DataPlane dataPlane = batfish.loadDataPlane(batfish.getSnapshot()); BidirectionalReachabilityAnalysis analysis = new BidirectionalReachabilityAnalysis( PKT, configs, dataPlane.getForwardingAnalysis(), new IpsRoutedOutInterfacesFactory(dataPlane.getFibs()), IpSpaceAssignment.builder().assign(RTN_START_LOC, RTN_START_IPS).build(), TRUE, ImmutableSet.of(), ImmutableSet.of(RTN_TRANSIT), ImmutableSet.of(RTN_DST), ImmutableSet.of(ACCEPTED)); BidirectionalReachabilityResult result = analysis.getResult(); IpSpaceToBDD dst = PKT.getDstIpSpaceToBDD(); BDD transitDstIpBdd = dst.toBDD(RTN_TRANSIT_DST_IP); IpSpaceToBDD src = PKT.getSrcIpSpaceToBDD(); BDD transitSrcIpBdd = src.toBDD(RTN_TRANSIT_SRC_IP); BDD transitReturnIpBdd = src.toBDD(RTN_TRANSIT_RETURN_IP); assertThat( result.getStartLocationReturnPassSuccessBdds(), equalTo(ImmutableMap.of(RTN_START_LOC, transitSrcIpBdd.and(transitDstIpBdd)))); assertThat( result.getStartLocationReturnPassFailureBdds(), equalTo(ImmutableMap.of(RTN_START_LOC, transitReturnIpBdd.and(transitDstIpBdd)))); }
public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } BidirectionalReachabilityAnalysis(
      BDDPacket bddPacket,
      Map<String, Configuration> configs,
      ForwardingAnalysis forwardingAnalysis,
      IpsRoutedOutInterfacesFactory ipsRoutedOutInterfacesFactory,
      IpSpaceAssignment srcIpSpaceAssignment,
      AclLineMatchExpr initialForwardHeaderSpace,
      Set<String> forbiddenTransitNodes,
      Set<String> requiredTransitNodes,
      Set<String> forwardPassFinalNodes,
      Set<FlowDisposition> forwardPassActions); }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } BidirectionalReachabilityAnalysis(
      BDDPacket bddPacket,
      Map<String, Configuration> configs,
      ForwardingAnalysis forwardingAnalysis,
      IpsRoutedOutInterfacesFactory ipsRoutedOutInterfacesFactory,
      IpSpaceAssignment srcIpSpaceAssignment,
      AclLineMatchExpr initialForwardHeaderSpace,
      Set<String> forbiddenTransitNodes,
      Set<String> requiredTransitNodes,
      Set<String> forwardPassFinalNodes,
      Set<FlowDisposition> forwardPassActions); BidirectionalReachabilityResult getResult(); }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } BidirectionalReachabilityAnalysis(
      BDDPacket bddPacket,
      Map<String, Configuration> configs,
      ForwardingAnalysis forwardingAnalysis,
      IpsRoutedOutInterfacesFactory ipsRoutedOutInterfacesFactory,
      IpSpaceAssignment srcIpSpaceAssignment,
      AclLineMatchExpr initialForwardHeaderSpace,
      Set<String> forbiddenTransitNodes,
      Set<String> requiredTransitNodes,
      Set<String> forwardPassFinalNodes,
      Set<FlowDisposition> forwardPassActions); BidirectionalReachabilityResult getResult();  }