nuttx-apps/netutils/ptpd
wenquan1 e3e3933138 netutils/ptpd: use status file for ptpd_status IPC
Replace the sigqueue + shared-memory IPC mechanism in ptpd_status()
with a file-based approach:

  - Daemon side: on SIGUSR1, write a binary ptpd_status_s struct to
    a temp file and atomically rename it to the status path.
  - Client side: send kill(SIGUSR1), poll for the file to appear,
    then read the struct back.

This removes the CONFIG_BUILD_FLAT restriction (the old code returned
-ENOTSUP for Protected and Kernel builds) and avoids passing pointers
across address spaces via sigqueue.  The status file path is
configurable via NETUTILS_PTPD_STATUSFILE (default /tmp/ptpd.status).

The atomic temp + rename pattern ensures readers never see a partial
write.

Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
2026-09-18 17:00:03 +08:00
..
CMakeLists.txt netutils/ptpd: add CMakelist for ptpd 2025-12-30 08:51:51 -03:00
Kconfig netutils/ptpd: use status file for ptpd_status IPC 2026-09-18 17:00:03 +08:00
Make.defs netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
Makefile netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
ptpd.c netutils/ptpd: use status file for ptpd_status IPC 2026-09-18 17:00:03 +08:00
ptpv2.h netutils/ptpd: fix Delay_Req transmission over AF_PACKET 2026-09-15 09:09:00 -03:00