Layer3Match layer3Match = match.getLayer3Match();
boolean arpFound = false;
if (layer3Match instanceof ArpMatch) {
Layer3Match layer3Match = match.getLayer3Match();
boolean arpFound = false;
if (layer3Match instanceof ArpMatch) {
.getArpTargetTransportAddress().getValue());
assertEquals("Source MAC address is wrong.", "ff:ee:dd:cc:bb:aa", ((ArpMatch) layer3Match)
.getArpSourceHardwareAddress().getAddress().getValue());
.getArpTargetTransportAddress().getValue());
assertEquals("Source MAC address is wrong.", "ff:ee:dd:cc:bb:aa", ((ArpMatch) layer3Match)
.getArpSourceHardwareAddress().getAddress().getValue());
boolean ipv4Found = false;
layer3Match = match.getLayer3Match();
if (layer3Match instanceof Ipv4Match) {
boolean ipv4Found = false;
layer3Match = match.getLayer3Match();
if (layer3Match instanceof Ipv4Match) {
.getIpv4Destination().getValue());
}
assertNotNull("Ipv4 wasn't found", ipv4Found);
.getIpv4Destination().getValue());
}
assertNotNull("Ipv4 wasn't found", ipv4Found);
boolean ipv6Found = false;
layer3Match = match.getLayer3Match();
if (layer3Match instanceof Ipv6Match) {
boolean ipv6Found = false;
layer3Match = match.getLayer3Match();
if (layer3Match instanceof Ipv6Match) {
- assertEquals("Source IP address is wrong.", "2001:db8:85a3::8a2e:370:7335", ((Ipv6Match) layer3Match)
+ assertEquals("Source IP address is wrong.", "2001:db8:85a3::8a2e:370:7335/128", ((Ipv6Match) layer3Match)
((Ipv6Match) layer3Match).getIpv6Destination().getValue());
}
assertNotNull("Ipv6 wasn't found", ipv6Found);
((Ipv6Match) layer3Match).getIpv6Destination().getValue());
}
assertNotNull("Ipv6 wasn't found", ipv6Found);
.getIpv4Address().getValue());
}
assertTrue("Ipv4 address wasn't found.", ipv4AddressFound);
} else if (innerAction instanceof SetNwTosActionCase) {
.getIpv4Address().getValue());
}
assertTrue("Ipv4 address wasn't found.", ipv4AddressFound);
} else if (innerAction instanceof SetNwTosActionCase) {
- assertEquals("Wrong TOS in SetNwTosAction.", (Integer) 63, ((SetNwTosActionCase) innerAction).getSetNwTosAction().getTos());
+ assertEquals("Wrong TOS in SetNwTosAction.", (Integer) 252, ((SetNwTosActionCase) innerAction).getSetNwTosAction().getTos());
} else if (innerAction instanceof SetNwDstActionCase) {
Address address = ((SetNwDstActionCase) innerAction).getSetNwDstAction().getAddress();
boolean ipv4AddressFound = false;
if (address instanceof Ipv4) {
ipv4AddressFound = true;
} else if (innerAction instanceof SetNwDstActionCase) {
Address address = ((SetNwDstActionCase) innerAction).getSetNwDstAction().getAddress();
boolean ipv4AddressFound = false;
if (address instanceof Ipv4) {
ipv4AddressFound = true;
.getIpv4Address().getValue());
}
assertTrue("Ipv4 address wasn't found.", ipv4AddressFound);
.getIpv4Address().getValue());
}
assertTrue("Ipv4 address wasn't found.", ipv4AddressFound);
.getIpv4Address().getValue());
}
assertTrue("Ipv4 address wasn't found.", ipv4AddressFound);
.getIpv4Address().getValue());
}
assertTrue("Ipv4 address wasn't found.", ipv4AddressFound);