Skip to content

Commit 01b586c

Browse files
committed
PtpLabClock.Pcap sekarang memakai SharpPcap 6.3.1.
1 parent a7c334f commit 01b586c

87 files changed

Lines changed: 1030 additions & 1177 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build.yml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Windows build
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: '8.0.x'
23+
24+
- name: Validate repository layout
25+
shell: pwsh
26+
run: .\tools\scripts\validate-layout.ps1
27+
28+
- name: Restore
29+
run: dotnet restore .\PtpLabClock.sln
30+
31+
- name: Build
32+
run: dotnet build .\PtpLabClock.sln -c Release --no-restore
33+
34+
- name: Test
35+
run: dotnet test .\PtpLabClock.sln -c Release --no-build --logger trx --results-directory TestResults
36+
37+
- name: Protocol smoke validation
38+
run: dotnet run --project .\src\PtpLabClock.Console --configuration Release -- --validate-protocol --domain 0
39+
40+
- name: Upload test results
41+
if: always()
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: test-results
45+
path: TestResults

‎.github/workflows/release.yml‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
package:
11+
name: Package Windows artifacts
12+
runs-on: windows-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: '8.0.x'
24+
25+
- name: Restore
26+
run: dotnet restore .\PtpLabClock.sln
27+
28+
- name: Test
29+
run: dotnet test .\PtpLabClock.sln -c Release --no-restore
30+
31+
- name: Publish WPF app
32+
run: dotnet publish .\src\PtpLabClock.App\PtpLabClock.App.csproj -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true -p:PublishReadyToRun=false -o .\artifacts\PtpLabClock.App.win-x64
33+
34+
- name: Publish console tool
35+
run: dotnet publish .\src\PtpLabClock.Console\PtpLabClock.Console.csproj -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true -p:PublishReadyToRun=false -o .\artifacts\PtpLabClock.Console.win-x64
36+
37+
- name: Create ZIP packages
38+
shell: pwsh
39+
run: |
40+
Compress-Archive -Path .\artifacts\PtpLabClock.App.win-x64\* -DestinationPath .\artifacts\PtpLabClock.App.win-x64.zip -Force
41+
Compress-Archive -Path .\artifacts\PtpLabClock.Console.win-x64\* -DestinationPath .\artifacts\PtpLabClock.Console.win-x64.zip -Force
42+
43+
- name: Upload artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: release-packages
47+
path: .\artifacts\*.zip
48+
49+
- name: Publish GitHub Release
50+
if: startsWith(github.ref, 'refs/tags/')
51+
uses: softprops/action-gh-release@v2
52+
with:
53+
files: .\artifacts\*.zip
54+
generate_release_notes: true

‎AGENTS.md‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ The product is **not** a GPS/PTP grandmaster replacement. It is a Windows-friend
1212

1313
## License Direction
1414

15-
The repository is licensed as **GPL-3.0-or-later**.
15+
The repository is licensed as **Apache-2.0**.
1616

1717
Rules:
1818

19-
1. Keep the `LICENSE` file as the full GPLv3 text.
20-
2. Keep `Directory.Build.props` with `PackageLicenseExpression=GPL-3.0-or-later`.
19+
1. Keep the `LICENSE` file as the full Apache License 2.0 text.
20+
2. Keep `Directory.Build.props` with `PackageLicenseExpression=Apache-2.0`.
2121
3. Add SPDX headers to new source files:
22-
- C#: `// SPDX-License-Identifier: GPL-3.0-or-later`
23-
- XAML/XML: `<!-- SPDX-License-Identifier: GPL-3.0-or-later -->`
24-
4. Do not copy source code from linuxptp, Meinberg, or other references unless a license review explicitly permits it.
22+
- C#: `// SPDX-License-Identifier: Apache-2.0`
23+
- XAML/XML: `<!-- SPDX-License-Identifier: Apache-2.0 -->`
24+
4. Do not copy source code from linuxptp, Meinberg, PTPSync, Npcap samples, SharpPcap samples, or other references unless a license review explicitly permits it.
2525
5. Do not bundle Npcap installer by default. Link to Npcap install instructions instead.
2626
6. Maintain `THIRD-PARTY-NOTICES.md` whenever dependencies change.
27+
7. Keep Demo Mode and protocol validation independent from any raw packet dependency.
2728

2829
## Clean-Room Reference Model
2930

@@ -66,7 +67,7 @@ PtpLabClock.Protocol
6667
PTP header/body serialization, Ethernet frame builder, parser/validator.
6768
6869
PtpLabClock.Pcap
69-
Npcap/SharpPcap adapter discovery, capture, injection, BPF filter handling.
70+
RAW packet transport boundary. Keep any future Npcap/wrapper implementation isolated here after license review.
7071
7172
PtpLabClock.Config
7273
JSON profile/settings storage only.
@@ -81,7 +82,7 @@ PtpLabClock.Console
8182

8283
Status: active.
8384

84-
- GPL-3.0-or-later license.
85+
- Apache-2.0 license.
8586
- Clean-room policy.
8687
- Safety disclaimer.
8788
- Demo Mode must always work without Npcap.
@@ -244,7 +245,7 @@ Visual design is locked unless a change is strictly required for usability. New
244245
- Visual design is locked unless a change directly supports test evidence visibility.
245246
- Prefer byte-level protocol validation and Wireshark-verifiable outputs over new visual features.
246247
- PCAP files must be classic Ethernet PCAP unless pcapng metadata becomes necessary.
247-
- Keep recorder code dependency-free and simple; do not introduce heavy capture frameworks beyond Npcap/SharpPcap already used by transport.
248+
- Keep recorder code dependency-free and simple; do not introduce heavy capture frameworks. Any future packet wrapper must stay isolated in `PtpLabClock.Pcap` after license review.
248249
- Use `--validate-protocol --export-pcap` for deterministic builder evidence before live NIC testing.
249250
- Use `--record-pcap` for live TX/RX evidence capture during raw adapter tests.
250251

@@ -278,9 +279,9 @@ Engine direction after v13:
278279

279280
## v16 PDF Report Direction
280281

281-
Visual design remains locked. v16 adds `PtpLabClock.Reporting`, a QuestPDF-based formatted evidence report module. Keep this module isolated from Core so protocol/engine code does not depend on PDF rendering. Do not overclaim timing accuracy. All generated reports must preserve lab-only safety wording.
282+
Visual design remains locked. v16 adds `PtpLabClock.Reporting`, an isolated evidence report module. Keep this module isolated from Core so protocol/engine code does not depend on PDF rendering. Do not overclaim timing accuracy. All generated reports must preserve lab-only safety wording.
282283

283-
QuestPDF is used for code-first PDF generation. Set `QuestPDF.Settings.License = LicenseType.Community` before generating a report and keep third-party notices updated.
284+
The current report generator uses a small internal Apache-2.0 PDF writer to avoid external PDF licensing friction. If a third-party PDF package is added later, update `THIRD-PARTY-NOTICES.md` and review license compatibility first.
284285

285286

286287
## v17 WPF Export Report

‎Directory.Build.props‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
1+
<!-- SPDX-License-Identifier: Apache-2.0 -->
22
<Project>
33
<PropertyGroup>
44
<Authors>Ari Sulistiono</Authors>
55
<Company>Process Bus Timing Lab</Company>
66
<Product>Process Bus Timing Lab</Product>
77
<Copyright>Copyright (C) 2026 Ari Sulistiono</Copyright>
8-
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
8+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
99
<RepositoryType>git</RepositoryType>
1010
<Nullable>enable</Nullable>
1111
<ImplicitUsings>enable</ImplicitUsings>
12+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
1213
</PropertyGroup>
1314
</Project>

0 commit comments

Comments
 (0)