diff --git a/CHANGELOG.md b/CHANGELOG.md index 45df90c..b392da4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. [#7](https://github.com/netsec-ethz/scion-java-multiping/pull/7) - ICMP fixes (ignore IPv6 private addresses) [#8](https://github.com/netsec-ethz/scion-java-multiping/pull/8) +- Update to JPAN 0.5.1 + [#11](https://github.com/netsec-ethz/scion-java-multiping/pull/11) ## [0.3.0] - 2024-11-22 diff --git a/pom.xml b/pom.xml index 9a3bc8d..08fd9a9 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ org.scion jpan - 0.4.1 + 0.5.1 diff --git a/src/main/java/org/scion/multiping/PingAll.java b/src/main/java/org/scion/multiping/PingAll.java index 96d62ac..581fa37 100644 --- a/src/main/java/org/scion/multiping/PingAll.java +++ b/src/main/java/org/scion/multiping/PingAll.java @@ -79,7 +79,7 @@ private enum Policy { SHORTEST_ECHO } - private static final Policy POLICY = Policy.SHORTEST_TR; // SHORTEST_TR; + private static final Policy POLICY = Policy.SHORTEST_TR; // Policy.FASTEST_TR; // SHORTEST_TR; private static final boolean SHOW_PATH = !true; public static void main(String[] args) throws IOException { @@ -231,7 +231,7 @@ private Scmp.TimedMessage findPaths(List paths, Ref bestOut) { } private Scmp.EchoMessage findShortestEcho(List paths, Ref refBest) { - Path path = PathPolicy.MIN_HOPS.filter(paths); + Path path = PathPolicy.MIN_HOPS.filter(paths).get(0); refBest.set(path); ByteBuffer bb = ByteBuffer.allocate(0); try (ScmpSender sender = Scmp.newSenderBuilder().build()) { @@ -259,7 +259,7 @@ private Scmp.EchoMessage findShortestEcho(List paths, Ref refBest) { } private Scmp.TracerouteMessage findShortestTR(List paths, Ref refBest) { - Path path = PathPolicy.MIN_HOPS.filter(paths); + Path path = PathPolicy.MIN_HOPS.filter(paths).get(0); refBest.set(path); try (ScmpSender sender = Scmp.newSenderBuilder().build()) { nPathTried++; diff --git a/src/main/java/org/scion/multiping/PingRepeatBlocking.java b/src/main/java/org/scion/multiping/PingRepeatBlocking.java index 1b393b3..5aa8bb1 100644 --- a/src/main/java/org/scion/multiping/PingRepeatBlocking.java +++ b/src/main/java/org/scion/multiping/PingRepeatBlocking.java @@ -200,7 +200,7 @@ private Scmp.TimedMessage findPaths(List paths, Ref bestOut) { } private Scmp.EchoMessage findShortestEcho(List paths, Ref refBest) { - Path path = PathPolicy.MIN_HOPS.filter(paths); + Path path = PathPolicy.MIN_HOPS.filter(paths).get(0); refBest.set(path); ByteBuffer bb = ByteBuffer.allocate(0); try (ScmpSender scmpChannel = Scmp.newSenderBuilder().build()) { @@ -228,7 +228,7 @@ private Scmp.EchoMessage findShortestEcho(List paths, Ref refBest) { } private Scmp.TracerouteMessage findShortestTR(List paths, Ref refBest) { - Path path = PathPolicy.MIN_HOPS.filter(paths); + Path path = PathPolicy.MIN_HOPS.filter(paths).get(0); refBest.set(path); try (ScmpSender scmpChannel = Scmp.newSenderBuilder().build()) { nPathTried++;