@Test public void testIsPrivateIp() { BDD isPrivateIp = isPrivateIp(PKT.getDstIpSpaceToBDD()); IpSpaceToBDD dstIp = PKT.getDstIpSpaceToBDD(); BDD privateSubnet10 = dstIp.toBDD(PRIVATE_SUBNET_10); BDD privateSubnet172 = dstIp.toBDD(PRIVATE_SUBNET_172); BDD privateSubnet192 = dstIp.toBDD(PRIVATE_SUBNET_192); assertEquals(privateSubnet10.or(privateSubnet172).or(privateSubnet192), isPrivateIp); }
@VisibleForTesting static BDD isPrivateIp(IpSpaceToBDD ip) { return BDDOps.orNull( ip.toBDD(PRIVATE_SUBNET_10), ip.toBDD(PRIVATE_SUBNET_172), ip.toBDD(PRIVATE_SUBNET_192)); }
BDDFlowConstraintGenerator { @VisibleForTesting static BDD isPrivateIp(IpSpaceToBDD ip) { return BDDOps.orNull( ip.toBDD(PRIVATE_SUBNET_10), ip.toBDD(PRIVATE_SUBNET_172), ip.toBDD(PRIVATE_SUBNET_192)); } }
BDDFlowConstraintGenerator { @VisibleForTesting static BDD isPrivateIp(IpSpaceToBDD ip) { return BDDOps.orNull( ip.toBDD(PRIVATE_SUBNET_10), ip.toBDD(PRIVATE_SUBNET_172), ip.toBDD(PRIVATE_SUBNET_192)); } BDDFlowConstraintGenerator(BDDPacket pkt); }
BDDFlowConstraintGenerator { @VisibleForTesting static BDD isPrivateIp(IpSpaceToBDD ip) { return BDDOps.orNull( ip.toBDD(PRIVATE_SUBNET_10), ip.toBDD(PRIVATE_SUBNET_172), ip.toBDD(PRIVATE_SUBNET_192)); } BDDFlowConstraintGenerator(BDDPacket pkt); List<BDD> generateFlowPreference(FlowPreference preference); }
BDDFlowConstraintGenerator { @VisibleForTesting static BDD isPrivateIp(IpSpaceToBDD ip) { return BDDOps.orNull( ip.toBDD(PRIVATE_SUBNET_10), ip.toBDD(PRIVATE_SUBNET_172), ip.toBDD(PRIVATE_SUBNET_192)); } BDDFlowConstraintGenerator(BDDPacket pkt); List<BDD> generateFlowPreference(FlowPreference preference);  }