@Test public void testDeniedByAcl() { Ip fooIp = Ip.parse("1.1.1.1"); BDD fooIpBDD = PKT.getDstIp().value(fooIp.asLong()); IpAccessList fooAcl = aclWithLines(accepting(HeaderSpace.builder().setDstIps(fooIp.toIpSpace()).build())); Map<String, IpAccessList> namedAcls = ImmutableMap.of("foo", fooAcl); IpAccessList acl = aclWithLines(accepting(new DeniedByAcl("foo"))); BDD bdd = new IpAccessListToBddImpl(PKT, BDDSourceManager.empty(PKT), namedAcls, ImmutableMap.of()) .toBdd(acl); assertThat(bdd, equalTo(fooIpBDD.not())); }
public static BDD toBDD( BDDPacket pkt, IpAccessList acl, Map<String, IpAccessList> aclEnv, Map<String, IpSpace> ipSpaceEnv, BDDSourceManager bddSrcManager) { return new IpAccessListToBddImpl(pkt, bddSrcManager, aclEnv, ipSpaceEnv).toBdd(acl); }
IpAccessListToBdd { public static BDD toBDD( BDDPacket pkt, IpAccessList acl, Map<String, IpAccessList> aclEnv, Map<String, IpSpace> ipSpaceEnv, BDDSourceManager bddSrcManager) { return new IpAccessListToBddImpl(pkt, bddSrcManager, aclEnv, ipSpaceEnv).toBdd(acl); } }
IpAccessListToBdd { public static BDD toBDD( BDDPacket pkt, IpAccessList acl, Map<String, IpAccessList> aclEnv, Map<String, IpSpace> ipSpaceEnv, BDDSourceManager bddSrcManager) { return new IpAccessListToBddImpl(pkt, bddSrcManager, aclEnv, ipSpaceEnv).toBdd(acl); } protected  IpAccessListToBdd(
      @Nonnull BDDPacket pkt,
      @Nonnull BDDSourceManager bddSrcManager,
      @Nonnull Map<String, IpAccessList> aclEnv,
      @Nonnull Map<String, IpSpace> ipSpaceEnv); protected  IpAccessListToBdd(
      @Nonnull BDDPacket pkt,
      @Nonnull BDDSourceManager bddSrcManager,
      @Nonnull HeaderSpaceToBDD headerSpaceToBDD,
      @Nonnull Map<String, IpAccessList> aclEnv); }
IpAccessListToBdd { public static BDD toBDD( BDDPacket pkt, IpAccessList acl, Map<String, IpAccessList> aclEnv, Map<String, IpSpace> ipSpaceEnv, BDDSourceManager bddSrcManager) { return new IpAccessListToBddImpl(pkt, bddSrcManager, aclEnv, ipSpaceEnv).toBdd(acl); } protected  IpAccessListToBdd(
      @Nonnull BDDPacket pkt,
      @Nonnull BDDSourceManager bddSrcManager,
      @Nonnull Map<String, IpAccessList> aclEnv,
      @Nonnull Map<String, IpSpace> ipSpaceEnv); protected  IpAccessListToBdd(
      @Nonnull BDDPacket pkt,
      @Nonnull BDDSourceManager bddSrcManager,
      @Nonnull HeaderSpaceToBDD headerSpaceToBDD,
      @Nonnull Map<String, IpAccessList> aclEnv); static Map<String, BDD> toBdds(
      BDDPacket pkt,
      Collection<IpAccessList> aclsToConvert,
      Map<String, IpAccessList> aclEnv,
      Map<String, IpSpace> ipSpaceEnv,
      BDDSourceManager bddSrcManager); static BDD toBDD(
      BDDPacket pkt,
      IpAccessList acl,
      Map<String, IpAccessList> aclEnv,
      Map<String, IpSpace> ipSpaceEnv,
      BDDSourceManager bddSrcManager); static BDD toBDD(BDDPacket pkt, IpAccessList acl); abstract BDD toBdd(AclLineMatchExpr expr); abstract PermitAndDenyBdds toPermitAndDenyBdds(AclLine line); final BDDPacket getBDDPacket(); @Nonnull final HeaderSpaceToBDD getHeaderSpaceToBDD(); @Nonnull final BDD toBdd(IpAccessList acl); List<PermitAndDenyBdds> reachAndMatchLines(IpAccessList acl); }
IpAccessListToBdd { public static BDD toBDD( BDDPacket pkt, IpAccessList acl, Map<String, IpAccessList> aclEnv, Map<String, IpSpace> ipSpaceEnv, BDDSourceManager bddSrcManager) { return new IpAccessListToBddImpl(pkt, bddSrcManager, aclEnv, ipSpaceEnv).toBdd(acl); } protected  IpAccessListToBdd(
      @Nonnull BDDPacket pkt,
      @Nonnull BDDSourceManager bddSrcManager,
      @Nonnull Map<String, IpAccessList> aclEnv,
      @Nonnull Map<String, IpSpace> ipSpaceEnv); protected  IpAccessListToBdd(
      @Nonnull BDDPacket pkt,
      @Nonnull BDDSourceManager bddSrcManager,
      @Nonnull HeaderSpaceToBDD headerSpaceToBDD,
      @Nonnull Map<String, IpAccessList> aclEnv); static Map<String, BDD> toBdds(
      BDDPacket pkt,
      Collection<IpAccessList> aclsToConvert,
      Map<String, IpAccessList> aclEnv,
      Map<String, IpSpace> ipSpaceEnv,
      BDDSourceManager bddSrcManager); static BDD toBDD(
      BDDPacket pkt,
      IpAccessList acl,
      Map<String, IpAccessList> aclEnv,
      Map<String, IpSpace> ipSpaceEnv,
      BDDSourceManager bddSrcManager); static BDD toBDD(BDDPacket pkt, IpAccessList acl); abstract BDD toBdd(AclLineMatchExpr expr); abstract PermitAndDenyBdds toPermitAndDenyBdds(AclLine line); final BDDPacket getBDDPacket(); @Nonnull final HeaderSpaceToBDD getHeaderSpaceToBDD(); @Nonnull final BDD toBdd(IpAccessList acl); List<PermitAndDenyBdds> reachAndMatchLines(IpAccessList acl);  }