From 850834ff240c15976e9c416110f54ed8e5e7e8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tilmann=20Z=C3=A4schke?= Date: Mon, 4 May 2026 14:01:48 +0200 Subject: [PATCH 1/4] JPAN 0.7.0 --- CHANGELOG.md | 22 ++++++++++---------- pom.xml | 4 ++-- src/main/java/org/scion/cli/Address.java | 2 +- src/main/java/org/scion/cli/util/Prober.java | 2 +- src/main/java/org/scion/cli/util/Util.java | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b076ed..f45d2a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,44 +14,44 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed local port option fow showpaths probing, document --healthy-only for ping and traceroute. - [#11](https://github.com/netsec-ethz/scion-java-multiping/pull/11) + [#11](https://github.com/netsec-ethz/jpan-cli/pull/11) - Enable SHIM by default. Fix for #8. - [#12](https://github.com/netsec-ethz/scion-java-multiping/pull/12) + [#12](https://github.com/netsec-ethz/jpan-cli/pull/12) - Improve SCMP error handling. - [#13](https://github.com/netsec-ethz/scion-java-multiping/pull/13) + [#13](https://github.com/netsec-ethz/jpan-cli/pull/13) - Local AS causes exception. - [#15](https://github.com/netsec-ethz/scion-java-multiping/pull/15) + [#15](https://github.com/netsec-ethz/jpan-cli/pull/15) ## [0.2.1] - 2026-03-27 ### Fixed - Fixed showpaths showing wrong path status (of by 1 error). - [#9](https://github.com/netsec-ethz/scion-java-multiping/pull/9) + [#9](https://github.com/netsec-ethz/jpan-cli/pull/9) - Fixed exception when path probes did no return. - [#10](https://github.com/netsec-ethz/scion-java-multiping/pull/10) + [#10](https://github.com/netsec-ethz/jpan-cli/pull/10) ## [0.2.0] - 2026-03-17 ### Added - Support for --log.level - [#4](https://github.com/netsec-ethz/scion-java-multiping/pull/4) + [#4](https://github.com/netsec-ethz/jpan-cli/pull/4) - Added path probing for showpaths and --no-probe - [#5](https://github.com/netsec-ethz/scion-java-multiping/pull/5) + [#5](https://github.com/netsec-ethz/jpan-cli/pull/5) - Added path probing for ping and --healthy-only - [#6](https://github.com/netsec-ethz/scion-java-multiping/pull/6) + [#6](https://github.com/netsec-ethz/jpan-cli/pull/6) ### Fixed - Fixed showpaths issues. - [#2](https://github.com/netsec-ethz/scion-java-multiping/pull/2) + [#2](https://github.com/netsec-ethz/jpan-cli/pull/2) ## [0.1.0] - 2026-03-11 ### Added - Everything - [#1](https://github.com/netsec-ethz/scion-java-multiping/pull/1) + [#1](https://github.com/netsec-ethz/jpan-cli/pull/1) ### Changed diff --git a/pom.xml b/pom.xml index d8f95f8..755e3b7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.scion jpan-cli - 0.1.0-SNAPSHOT + 0.2.3-SNAPSHOT UTF-8 @@ -83,7 +83,7 @@ org.scion jpan - 0.6.1 + 0.6.2-SNAPSHOT diff --git a/src/main/java/org/scion/cli/Address.java b/src/main/java/org/scion/cli/Address.java index 366442a..c5279b7 100644 --- a/src/main/java/org/scion/cli/Address.java +++ b/src/main/java/org/scion/cli/Address.java @@ -25,7 +25,7 @@ import org.scion.cli.util.Errors; import org.scion.cli.util.ExitCodeException; import org.scion.jpan.*; -import org.scion.jpan.internal.IPHelper; +import org.scion.jpan.internal.util.IPHelper; /** * This demo mimics the "scion ping" command available in scionproto ( Date: Mon, 4 May 2026 14:03:31 +0200 Subject: [PATCH 2/4] JPAN 0.7.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 755e3b7..85de9c6 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ org.scion jpan - 0.6.2-SNAPSHOT + 0.7.0 From 2c24883baa4b6e4d83723732971a48dc57b08d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tilmann=20Z=C3=A4schke?= Date: Mon, 4 May 2026 14:37:26 +0200 Subject: [PATCH 3/4] JPAN 0.7.0 --- src/main/java/org/scion/cli/util/Prober.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/scion/cli/util/Prober.java b/src/main/java/org/scion/cli/util/Prober.java index 795910d..3b6ba99 100644 --- a/src/main/java/org/scion/cli/util/Prober.java +++ b/src/main/java/org/scion/cli/util/Prober.java @@ -16,12 +16,14 @@ import java.io.IOException; import java.net.BindException; +import java.nio.ByteBuffer; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.scion.jpan.*; +import org.scion.jpan.internal.header.ScmpParser; public class Prober { @@ -33,14 +35,14 @@ public enum Status { // StatusAlive indicates that the expected reply did come back in time. Alive, // StatusSCMP indicates that an unexpected SCMP packet came in the reply. - SCMP; + SCMP } private Prober() {} public static Map probe(Integer port, int timeoutMs, List paths) { if (paths.size() == 1 && paths.get(0).getRawPath().length == 0) { - // emtpy path + // empty path Map result = new HashMap<>(); result.put(0, Status.Alive); return result; @@ -102,7 +104,19 @@ public void onTimeout(Scmp.TimedMessage msg) { public void onError(Scmp.ErrorMessage msg) { errors.incrementAndGet(); barrier.countDown(); - // TODO result.put(msg.getSequenceNumber(), Status.SCMP); + try { + Scmp.Message m2; + m2 = ScmpParser.consume(ByteBuffer.wrap(msg.getCause()), (ResponsePath) msg.getPath()); + Scmp.TypeCode tc = m2.getTypeCode(); + if (tc == Scmp.TypeCode.TYPE_128 || tc == Scmp.TypeCode.TYPE_130) { + if (m2 instanceof Scmp.TimedMessage) { + int sn = ((Scmp.TimedMessage) m2).getSequenceNumber(); + result.put(sn, Status.SCMP); + } + } + } catch (RuntimeException e) { + Util.println("Could not decode Scmp Error (" + msg.getTypeCode() + "): " + e.getMessage()); + } } @Override From ecd5c3411dfe36645bb95134dc4420fb3463538a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tilmann=20Z=C3=A4schke?= Date: Mon, 4 May 2026 14:39:16 +0200 Subject: [PATCH 4/4] JPAN 0.7.0 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45d2a1..cee7369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] --- Nothing yet +- Update to JPAN 0.7.0 and improve SCMP error handling. + [#18](https://github.com/netsec-ethz/jpan-cli/pull/18) ## [0.2.2] - 2026-03-27