Skip to content

feat: HWタイムスタンプ対応・ヘッダー分割・開発基盤整備#11

Merged
yuu61 merged 5 commits into
mainfrom
feat/hw-timestamp
Feb 23, 2026
Merged

feat: HWタイムスタンプ対応・ヘッダー分割・開発基盤整備#11
yuu61 merged 5 commits into
mainfrom
feat/hw-timestamp

Conversation

@yuu61
Copy link
Copy Markdown
Owner

@yuu61 yuu61 commented Feb 23, 2026

Summary

  • Linux NIC ハードウェアタイムスタンプ (SO_TIMESTAMPING) と PHC (PTP Hardware Clock) 連携を実装し、-i / -c オプションで利用可能に
  • stamp.h を5つの専用ヘッダー (stamp_platform.h, stamp_protocol.h, stamp_time.h, stamp_kernel_ts.h, stamp_net.h) にモジュール分割
  • .clang-format, .clang-tidy, .cppcheck-suppressions など静的解析・フォーマッター設定を追加
  • ドキュメント再編: docs/BUILD.md, docs/USAGE.md, docs/ARCHITECTURE.md を新設し、関連RFC資料を docs/RFC/ に整理
  • テストを250+に拡張、CMakePresets に ASan/UBSan プリセットを追加
  • CLAUDE.md を新設しプロジェクト規約を明文化

Test plan

  • Debug ビルド & テスト通過 (cmake --build --preset debug && ctest --preset debug)
  • clang-tidy 警告なし
  • cppcheck エラーなし
  • Release ビルド確認
  • CI (Ubuntu + Windows MSYS2) の通過を確認

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 23, 2026 05:19
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Comment thread src/reflector.c Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements Linux NIC hardware timestamping with PHC (PTP Hardware Clock) integration, modularizes the header structure from a monolithic stamp.h into 5 specialized headers, and establishes comprehensive development infrastructure including static analysis tools, sanitizer presets, and extensive documentation.

Changes:

  • Hardware timestamp support via SO_TIMESTAMPING and PHC device integration (-i and -c options)
  • Header modularization: split stamp.h into stamp_platform.h, stamp_protocol.h, stamp_time.h, stamp_kernel_ts.h, stamp_net.h, and stamp_calc.h
  • Development infrastructure: .clang-format, .clang-tidy, .cppcheck-suppressions, CMake presets for ASan/UBSan, and PGO support
  • Documentation: new docs/BUILD.md, docs/USAGE.md, docs/ARCHITECTURE.md, and RFC references in docs/RFC/
  • Test expansion to 250+ tests with relaxed complexity thresholds in tests/.clang-tidy

Reviewed changes

Copilot reviewed 31 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/stamp_time.h Timestamp conversion functions (NTP/PTP), delay calculations, validation logic
src/stamp_protocol.h Protocol constants, packet structures, Error Estimate definitions
src/stamp_platform.h Platform abstraction (Windows/Linux), getopt compatibility, cleanup helpers
src/stamp_net.h Signal handlers, address utilities, port parsing
src/stamp_kernel_ts.h Kernel timestamp extraction, HW timestamp support, PHC integration (Linux)
src/stamp_calc.h Pure calculation functions for packet construction
src/stamp_globals.c Global variable definitions (g_running)
tests/.clang-tidy Relaxed complexity thresholds for test code
docs/USAGE.md CLI reference, usage examples, troubleshooting guide
docs/BUILD.md Build instructions, platform setup, optimization options
docs/ARCHITECTURE.md Technical specifications, header structure, timestamp system
docs/LICENSE.md License and attribution information
CMakeLists.txt Enhanced compiler flags (30+ warnings), security hardening, LTO/PGO support
CMakePresets.json ASan/UBSan, portable, and PGO presets
.clang-format Linux Kernel style enforcement
.clang-tidy Strict naming conventions and quality checks
.cppcheck-suppressions Documented suppressions for platform-specific code
CLAUDE.md Project conventions and coding guidelines
Various docs README updates, ROADMAP updates, CONTRIBUTING enhancements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@yuu61 yuu61 merged commit e5c766b into main Feb 23, 2026
5 checks passed
@yuu61 yuu61 deleted the feat/hw-timestamp branch February 23, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants