Skip to content

Commit 7ba517f

Browse files
author
Tilmann Zäschke
committed
Doc updates
1 parent d074075 commit 7ba517f

3 files changed

Lines changed: 26 additions & 17 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JPAN Command Line Tool
22

3-
A tool that allows echo, traceroute, showpaths, ... and other functionality, similar to
3+
A tool that allows `echo`, `traceroute`, `showpaths`, ... and other functionality, similar to
44
to the [SCION CLI tool](https://docs.scion.org/en/latest/command/scion/scion.html).
55
JPAN-CLI is stand-alone and does not require any locally installed SCION software.
66

@@ -18,7 +18,7 @@ JPAN-CLI provides several tools:
1818

1919
* `jpan-cli version` - Show the SCION version information
2020

21-
## Execution
21+
## Usage
2222

2323
All tools can be run from the executable jar file which is available in
2424
the [GitHub Releases section](https://github.com/netsec-ethz/jpan-cli/releases/download/v0.1.0/jpan-cli.jar).

src/main/java/org/scion/cli/Cli.java

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,16 @@ static void printUsageShowpaths() {
247247
println("'showpaths' lists available paths between the local and the specified");
248248
println("SCION AS.");
249249
println("");
250-
println("By default, the paths are probed. Paths served from the SCION Daemon's might not");
251-
println("forward traffic successfully (e.g. if a network link went down, or there is a black");
252-
println("hole on the path). To disable path probing, set the appropriate flag.");
253-
println("");
254-
println("If no alive path is discovered, json output is not enabled, and probing is not");
255-
println("disabled, showpaths will exit with the code 1.");
250+
println("Path probing: Unlike `scion`, jpan-cli does no path probing."); // TODO
251+
// println("By default, the paths are probed. Paths served from the SCION Daemon's might
252+
// not");
253+
// println("forward traffic successfully (e.g. if a network link went down, or there is a
254+
// black");
255+
// println("hole on the path). To disable path probing, set the appropriate flag.");
256+
println("");
257+
// println("If no alive path is discovered, json output is not enabled, and probing is not");
258+
// println("disabled, showpaths will exit with the code 1.");
259+
println("If no alive path is discovered, showpaths will exit with the code 1."); // TODO
256260
println("On other errors, showpaths will exit with code 2.");
257261
// println("");
258262
// printSequenceHelp();
@@ -266,13 +270,14 @@ static void printUsageShowpaths() {
266270
println("");
267271
println("Examples:");
268272
println(" jpan-cli showpaths 1-ff00:0:110 --extended");
269-
println(" jpan-cli showpaths 1-ff00:0:110 --local 127.0.0.55 --json");
270-
println(" jpan-cli showpaths 1-ff00:0:111 --sequence=\"0-0#2 0*\" # outgoing IfID=2");
271-
println(
272-
" jpan-cli showpaths 1-ff00:0:111 --sequence=\"0* 0-0#41\" # incoming IfID=41 at dstIA");
273-
println(
274-
" jpan-cli showpaths 1-ff00:0:111 --sequence=\"0* 1-ff00:0:112 0*\" # 1-ff00:0:112 on the path");
275-
println(" jpan-cli showpaths 1-ff00:0:110 --no-probe");
273+
// println(" jpan-cli showpaths 1-ff00:0:110 --local 127.0.0.55 --json");
274+
// println(" jpan-cli showpaths 1-ff00:0:111 --sequence=\"0-0#2 0*\" # outgoing IfID=2");
275+
// println(
276+
// " jpan-cli showpaths 1-ff00:0:111 --sequence=\"0* 0-0#41\" # incoming IfID=41 at dstIA");
277+
// println(
278+
// " jpan-cli showpaths 1-ff00:0:111 --sequence=\"0* 1-ff00:0:112 0*\" # 1-ff00:0:112 on
279+
// the path");
280+
// println(" jpan-cli showpaths 1-ff00:0:110 --no-probe");
276281
println("");
277282
println("Flags:");
278283
// println(" --epic Enable EPIC.");

src/main/java/org/scion/cli/Showpaths.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private static void parseArgs(String[] argsArray) {
108108
}
109109
}
110110

111-
public static int run() throws IOException {
111+
public static void run() throws IOException {
112112
ScionService service = Scion.defaultService();
113113
// dummy address
114114
InetSocketAddress destinationAddress =
@@ -150,7 +150,11 @@ public static int run() throws IOException {
150150
println(header + compact);
151151
}
152152
}
153-
return paths.size();
153+
154+
if (paths.isEmpty()) {
155+
throw new ExitCodeException(
156+
1, "No paths found to destination: " + ScionUtil.toStringIA(isdAs));
157+
}
154158
}
155159

156160
private static void printExtended(Path path, String localIP) {

0 commit comments

Comments
 (0)