Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,52 @@ 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

### 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
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.scion</groupId>
<artifactId>jpan-cli</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.2.3-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -83,7 +83,7 @@
<dependency>
<groupId>org.scion</groupId>
<artifactId>jpan</artifactId>
<version>0.6.1</version>
<version>0.7.0</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/scion/cli/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<a
Expand Down
20 changes: 17 additions & 3 deletions src/main/java/org/scion/cli/util/Prober.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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<Integer, Status> probe(Integer port, int timeoutMs, List<Path> paths) {
if (paths.size() == 1 && paths.get(0).getRawPath().length == 0) {
// emtpy path
// empty path
Map<Integer, Status> result = new HashMap<>();
result.put(0, Status.Alive);
return result;
Expand Down Expand Up @@ -102,7 +104,19 @@ public void onTimeout(Scmp.TimedMessage msg) {
public void onError(Scmp.ErrorMessage msg) {
errors.incrementAndGet();
barrier.countDown();
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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/scion/cli/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import org.scion.jpan.Scion;
import org.scion.jpan.ScionService;
import org.scion.jpan.ScionUtil;
import org.scion.jpan.internal.IPHelper;
import org.scion.jpan.internal.ScionAddress;
import org.scion.jpan.internal.Shim;
import org.scion.jpan.internal.util.IPHelper;

public class Util {

Expand Down
Loading