dotnet restore .\PtpLabClock.sln
dotnet build .\PtpLabClock.sln -c Release --no-restore
dotnet test .\PtpLabClock.sln -c Release --no-buildOr run the repository script:
.\tools\scripts\build.ps1dotnet run --project .\src\PtpLabClock.Console -- --validate-protocol --domain 0Expected result: Result: PASS.
Optional PCAP export:
dotnet run --project .\src\PtpLabClock.Console -- --validate-protocol --domain 0 --export-pcap .\captures\ptp-validation.pcapOpen the PCAP in Wireshark and use:
eth.type == 0x88f7 or ptp
dotnet run --project .\src\PtpLabClock.AppSelect Demo Engine first. Demo Mode does not require Npcap and validates the UI flow, counters, health cards, scenario buttons, and export behavior.
RAW mode requires Npcap installed on Windows and may require Administrator privileges.
dotnet run --project .\src\PtpLabClock.Console -- --list
dotnet run --project .\src\PtpLabClock.Console -- --raw-self-test --adapter-index 0 --domain 0VLAN-tagged self-test:
dotnet run --project .\src\PtpLabClock.Console -- --raw-self-test --adapter-index 0 --domain 0 --vlan --vlan-id 100 --vlan-pcp 4Prefer a wired Ethernet adapter. Wi-Fi, VPN, Bluetooth, and virtual adapters may capture but often block Layer-2 injection.
Untagged:
dotnet run --project .\src\PtpLabClock.Console -- --adapter-index 0 --domain 0 --profile iec61850VLAN-tagged:
dotnet run --project .\src\PtpLabClock.Console -- --adapter-index 0 --domain 0 --profile iec61850 --vlan --vlan-id 100 --vlan-pcp 4Display filter:
eth.type == 0x88f7 or ptp
Capture filter for untagged, VLAN, and QinQ PTP:
ether proto 0x88f7 or (vlan and ether proto 0x88f7) or (vlan and vlan and ether proto 0x88f7)