Skip to content

Commit ee37cca

Browse files
authored
Initial commit
Initial commit
2 parents a41cb21 + a7ee65f commit ee37cca

17 files changed

Lines changed: 2044 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Java
2+
3+
on: [push]
4+
5+
env:
6+
time: 3
7+
time_windows: 5
8+
9+
jobs:
10+
format-check:
11+
name: Check Code Formatting
12+
continue-on-error: true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 1
19+
- name: Check Format
20+
run: |
21+
mvn --batch-mode -Pverify-format clean compile
22+
shell: 'bash'
23+
24+
codecov:
25+
name: Codecov
26+
continue-on-error: true
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v6
31+
- name: Set up JDK
32+
uses: actions/setup-java@v5
33+
with:
34+
java-version: 21
35+
distribution: 'temurin'
36+
# - name: Install dependencies
37+
# run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
38+
- name: Run tests and collect coverage
39+
timeout-minutes: ${{ fromJSON(env.time) }}
40+
run: mvn -B test
41+
- name: Upload coverage reports to Codecov
42+
uses: codecov/codecov-action@v5
43+
env:
44+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
45+
46+
build:
47+
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
# run different builds with the listed java versions
51+
java: [ 8, 21, 25 ]
52+
name: "build-ubuntu Java ${{ matrix.java }}"
53+
steps:
54+
- uses: actions/checkout@v6
55+
- name: Set up JDK
56+
uses: actions/setup-java@v5
57+
with:
58+
java-version: ${{ matrix.java }}
59+
distribution: 'temurin'
60+
- name: Build with Maven
61+
timeout-minutes: ${{ fromJSON(env.time) }}
62+
run: mvn --batch-mode --update-snapshots install
63+
64+
65+
build-windows:
66+
runs-on: windows-latest
67+
steps:
68+
- uses: actions/checkout@v6
69+
- name: Set up JDK
70+
uses: actions/setup-java@v5
71+
with:
72+
java-version: 8
73+
distribution: 'temurin'
74+
- name: Build with Maven
75+
timeout-minutes: ${{ fromJSON(env.time_windows) }}
76+
run: mvn --batch-mode --update-snapshots install
77+
78+
79+
build-macos:
80+
runs-on: macos-latest
81+
steps:
82+
- uses: actions/checkout@v6
83+
- name: Set up JDK
84+
uses: actions/setup-java@v5
85+
with:
86+
java-version: 17
87+
distribution: 'temurin'
88+
- name: Build with Maven
89+
timeout-minutes: ${{ fromJSON(env.time) }}
90+
run: mvn --batch-mode --update-snapshots install

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@
2222
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2323
hs_err_pid*
2424
replay_pid*
25+
26+
.idea
27+
target/
28+
29+
dependency-reduced-pom.xml

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
-- Nothing yet
11+
12+
13+
### Changed
14+
15+
- Changed pretty much all names and created an executable main class.
16+
[#2](https://github.com/netsec-ethz/scion-java-multiping/pull/2)
17+
18+
## [0.1.0] - 2026-03-11
19+
20+
### Added
21+
22+
- Everything
23+
24+
### Changed
25+
26+
- Nothing
27+
28+
### Fixed
29+
30+
- Nothing
31+
32+
### Removed
33+
34+
- Nothing
35+
36+
[Unreleased]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.6.1...HEAD
37+
[0.6.1]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.6.0...v0.6.1
38+
[0.6.0]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.5.0...v0.6.0
39+
[0.5.0]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.4.0...v0.5.0
40+
[0.4.0]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.3.0...v0.4.0
41+
[0.3.0]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.2.0...v0.3.0
42+
[0.2.0]: https://github.com/netsec-ethz/scion-java-multiping/compare/v0.1.0...v0.2.0
43+
[0.1.0]: https://github.com/netsec-ethz/scion-java-multiping/compare/init_root_commit...v0.1.0

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
1-
# jpan-cli
2-
JPAN Command Line Tool
1+
# JPAN Command Line Tool
2+
3+
A tool that allows echo, traceroute, showpaths, ... and other functionality, similar to
4+
to the [SCION CLI tool](https://docs.scion.org/en/latest/command/scion/scion.html).
5+
JPAN-CLI is stand-alone and does not require any locally installed SCION software.
6+
7+
JPAN-CLI provides several tools:
8+
9+
* `jpan-cli address` - Show (one of) this host’s SCION address(es)
10+
11+
* `jpan-cli ping` - Test connectivity to a remote SCION host using SCMP echo packets
12+
13+
* `jpan-cli ping-responder` - Run a local server that responds to incoming SCION pings
14+
15+
* `jpan-cli showpaths` - Display paths to a SCION AS
16+
17+
* `jpan-cli traceroute` - Trace the SCION route to a remote SCION AS using SCMP traceroute packets
18+
19+
* `jpan-cli version` - Show the SCION version information
20+
21+
## Execution
22+
23+
All tools can be run from the executable jar file which is available in
24+
the [GitHub Releases section](https://github.com/netsec-ethz/jpan-cli/releases/download/v0.1.0/jpan-cli.jar).
25+
It can be executed with:
26+
27+
```
28+
java -jar jpan-cli.jar [tool-command]
29+
```
30+
31+
For example, to get command line help, the tool can be executed with:
32+
33+
```
34+
java -jar jpan-cli.jar help
35+
```
36+
37+
## Known Issues
38+
39+
In JPAN 0.6.1, the SCMP Responder will always return packets to 30041, regardless of their
40+
actual source port, see JPAN issue [#233](https://github.com/scionproto-contrib/jpan/issues/233).
41+
42+
# Troubleshooting
43+
44+
## No ping/traceroute answers received
45+
46+
In some ASes, border routers will send return packets to port 30041. To receive these packets,
47+
please start the tool with `--port 30041`.
48+
49+
50+
## No DNS search domain found. Please check your /etc/resolv.conf or similar.
51+
52+
This happens, for example, on Windows when using a VPN. One solution is to execute the jar with the
53+
following property (
54+
the example works only for `ethz.ch`):
55+
56+
```
57+
java -Dorg.scion.dnsSearchDomains=ethz.ch. -jar jpan-cli.jar
58+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE module PUBLIC
2+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
3+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
4+
<module name="Checker">
5+
<module name="TreeWalker">
6+
<!-- Checks for imports -->
7+
<!-- See http://checkstyle.sf.net/config_import.html -->
8+
<!-- <module name="AvoidStarImport">-->
9+
<!-- <property name="excludes" value="java.io,java.util,java.net,org.junit.jupiter.api.Assertions,org.scion.jpan"/>-->
10+
<!--&lt;!&ndash; <property name="severity" value="warning" />&ndash;&gt;-->
11+
<!-- </module>-->
12+
<module name="NeedBraces"/>
13+
</module>
14+
<module name="LineLength">
15+
<property name="max" value="200"/>
16+
</module>
17+
<!-- <module name="RegexpHeader">-->
18+
<!-- <property name="headerFile" value="checkstyle/java.header.txt"/>-->
19+
<!-- <property name="fileExtensions" value="java"/>-->
20+
<!-- </module>-->
21+
<module name="Header">
22+
<!-- <property name="headerFile" value="java.header.txt"/>-->
23+
<property name="headerFile" value="${base_dir}/config/checkstyle/java.header.txt"/>
24+
<property name="fileExtensions" value="java"/>
25+
<property name="ignoreLines" value="1"/>
26+
</module>
27+
</module>

config/checkstyle/java.header.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2024 ETH Zurich
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.

config/checkstyle/suppressions.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Puppy Crawl//DTD Suppressions 1.0//EN"
5+
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
6+
7+
<suppressions>
8+
<!-- <suppress checks="JavadocStyleCheck"-->
9+
<!-- files="GeneratedObject.java"-->
10+
<!-- lines="50-9999"/>-->
11+
<!-- <suppress checks="MagicNumberCheck"-->
12+
<!-- files="LegacyDatasetConvertor.java"-->
13+
<!-- lines="221,250-295"/>-->
14+
</suppressions>

0 commit comments

Comments
 (0)