@Test public void testGetRepresentativeFlow_testFilterPrefNoSrcPort() { HeaderSpaceToFlow headerSpaceToFlow = new HeaderSpaceToFlow(ImmutableMap.of(), FlowPreference.TESTFILTER); Optional<Builder> flowBuilder = headerSpaceToFlow.getRepresentativeFlow( HeaderSpace.builder() .setDstIps(Ip.parse("1.1.1.1").toIpSpace()) .setIpProtocols(IpProtocol.UDP) .setDstPorts(SubRange.singleton(1)) .build()); assertTrue(flowBuilder.isPresent()); assertThat(flowBuilder.get().getDstIp(), equalTo(Ip.parse("1.1.1.1"))); assertThat(flowBuilder.get().getIpProtocol(), equalTo(IpProtocol.UDP)); assertThat(flowBuilder.get().getDstPort(), equalTo(1)); assertThat(flowBuilder.get().getSrcPort(), equalTo(NamedPort.EPHEMERAL_LOWEST.number())); assertThat(flowBuilder.get().getPacketLength(), equalTo(DEFAULT_PACKET_LENGTH)); }
public Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs) { return BDD_PACKET.getFlow(_headerSpaceToBDD.toBDD(hs), _preference); }
HeaderSpaceToFlow { public Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs) { return BDD_PACKET.getFlow(_headerSpaceToBDD.toBDD(hs), _preference); } }
HeaderSpaceToFlow { public Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs) { return BDD_PACKET.getFlow(_headerSpaceToBDD.toBDD(hs), _preference); } HeaderSpaceToFlow(Map<String, IpSpace> ipSpaces, FlowPreference preference); }
HeaderSpaceToFlow { public Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs) { return BDD_PACKET.getFlow(_headerSpaceToBDD.toBDD(hs), _preference); } HeaderSpaceToFlow(Map<String, IpSpace> ipSpaces, FlowPreference preference); Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs); }
HeaderSpaceToFlow { public Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs) { return BDD_PACKET.getFlow(_headerSpaceToBDD.toBDD(hs), _preference); } HeaderSpaceToFlow(Map<String, IpSpace> ipSpaces, FlowPreference preference); Optional<Flow.Builder> getRepresentativeFlow(HeaderSpace hs);  }