From 388ab8eb55d021ce53adbdf4a793e73e237227b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tilmann=20Z=C3=A4schke?= Date: Fri, 4 Apr 2025 13:02:42 +0200 Subject: [PATCH] JPAN 0.5.1 --- CHANGELOG.md | 2 ++ pom.xml | 2 +- src/main/java/org/scion/multiping/PingAll.java | 6 +++--- src/main/java/org/scion/multiping/PingRepeatBlocking.java | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) 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++;