Name: nqptp Version: 0.1.git.24.7f86279a Release: 1%{?dist} Summary: Not Quite PTP License: GPLv2+ URL: https://github.com/mikebrady/nqptp VCS: git+https://github.com/Leuca/nqptp.git#7f86279ab25cf5e663c25490384ede3bd4c1a86d: Source: nqptp-7f86279a.tar.gz BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: make BuildRequires: systemd-rpm-macros %description nqptp is a daemon that monitors timing data from any PTP clocks – up to 64 – it sees on ports 319 and 320. It maintains records for each clock, identified by Clock ID and IP. It is a companion application to Shairport Sync and provides timing information for AirPlay 2 operation. %prep %setup -T -b 0 -q -n nqptp %build autoreconf -fi %configure --with-systemd-startup %make_build %install %make_install %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %{_bindir}/%{name} %{_unitdir}/%{name}.service %changelog * Thu Jun 02 2022 Luca 1.1-1 (none) * Thu Jun 02 2022 Luca 0.1-1 - enable automated Copr build - Update README.md - Update README.md - Update README.md - Update README.md - Always update the startup script in FreeBSD - Fix a syntax error in the startup script - Update RELEASE_NOTES.md - Minor changes to the INSTALL document - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Add a syslog tag request to the startup script. - Fix a compilation bug. - Add CLOCK_MONOTONIC as an alternative is CLOCK_MONOTONIC_RAW isn't available, as in FreeBSD. - Add an experimental FreeBSD service file and the automake and configure stuff. - Update RELEASE_NOTES.md - Remove the illegal "Provides" entry. - Remove the illegal "Provides" entry. - Update RELEASE_NOTES.md - Update RELEASE_NOTES.md - Update RELEASE_NOTES.md - Update RELEASE_NOTES.md - Update RELEASE_NOTES.md - Merge branch 'development' - Quieten a debug message. - Always create a new SHM interface for every new shm address provided. Remove redundant coded. Add a few debug messages. Enhance the service record to define the service provided. - Update README.md - Update README.md - Update RELEASE_NOTES.md - Update README.md - latest version of the nqptp interface header - Improve a few debug messages. - Fix some debug messages. - Enable nqptp to deal with multiple independent clients and their associated clock groups. Each client supplies the name of its SMI whenever it wishes to access the service. Note: named SMI interfaces are not garbage collected! - old and new system sort-of work now... - Adding more multi-client functionality (still incomplete) but keeping the original single client functional for the present. - Update RELEASE_NOTES.md - Update RELEASE_NOTES.md - Ensure the interface is updated when the mastership is removed. - Update RELEASE_NOTES.md - Further simplify nqptp to discard mastership history prior to being made a part of a new timing list. A bit hacky, to be sure. - Modify code so that all the sampling stuff can be omitted. This is to try to simplify the code. - Update RELEASE_NOTES.md - Make nqptp less sensitive to breaks in transmission from the master clock -- up to 300 seconds (5 minutes). - Update RELEASE_NOTES.md - Try to improve the reliability of restarting a "silent clock" device. Also turn off history (mostly) to see if we can make things simpler. - Try to improve the reliability of restarting a "silent clock" device. Also turn off history (mostly) to see if we can make things simpler. - Fix some issues suggested by clang-tidy. - Update README.md - Update RELEASE_NOTES.md - tweak PTP tracking coefficients - Continue to experiment with late follow-up correction weights. - Don't die if the clock table is full or address list is malformed -- just ignore any extra clocks or invalid ip specs. - Clang Format - Move to using CLOCK_MONOLITHIC_RAW to avoid NTP effects. Increase bias towards positive jitter changes. Bump interface version. - Add a comment, increase the weights of the jitter in forming the new offsets. - Allow up to 10 ms of negative jitter to be accepted. At the start, give extra weight to positive jitter as more likely to be a real thing. - clang format change only - Only install a service file if there isn't one there already. - Remove some redundant structure members and associated code. - Update README.md - Update README.md - Documentation update. - Merge branch 'development' into wakener - Merge branch 'development' of github.com:mikebrady/nqptp into development - Update README.md - Update README.md - Update the release notes. - Merge branch 'development' of https://github.com/mikebrady/nqptp into development - Update README.md - Remove superceded code. Calculate priority of ping based on priority of clock. - Follow an Announce of a better clock with an Announce of a worse one. The other end responds quicker. Don't wait for membership of a timing peer list to ping a clock into life -- more to do here. - Update RELEASE_NOTES.md - When a timing peer list is provided, wait for 0.5 sec for a FollowUp message from one of the peers. If none, send out bogus Announce messages to waken up any clocks out there. This is a hacky workaround for an Apple Silicon PTP bug/feature -- not sure which, but definitely not compatible with the IEEE PTP standard. - Experiment with replicating a Signaling packet coming from macOS and sending it to all clocks, to see if it wakens them. Try two different TLV payloads. It doesn't seem to have that function. - Add some PTP definitions -- a Signaling packet structure and a TLV structure - Merge branch 'development' of https://github.com/mikebrady/nqptp into development - Update RELEASE_NOTES.md - Merge branch 'development' of https://github.com/mikebrady/nqptp into development - Use libdir during systemd service install - Set the priorities to 248. - Send a faux announcment message to every timing peer. This seems to reawaken the PTP system in an Apple Silicon Mac. - Send an Announce message three times to each valid clock in a new timing peer list - get IPvX family when creating each clock record. - add ip family stuff to the clock records and the port sockets - Prepare an Announce message to send to all peers, hopfully to waken them up. - fix self id to allow for host byte order - add nctoh64() utility - Fix some -endian errors. Include port number in debug message. - cosmetic change only - Begin to add the ability to send out announce messages. - Add infrastructure for executing timed tasks, with a simple example. - Add a flag to selectively enable includion of the startup script. - Update RELEASE_NOTES.md - Updates from the main branch. - Update RELEASE_NOTES.md - Use DESTDIR - Candidate full implementation of BCM algorithm. Clang format. - Update RELEASE_NOTES.md - Create RELEASE_NOTES.md - Check return from getifaddrs and check that the address pointers are valid. - Check the ifa_addr before dereferencing it. - Remove misleading debug message. - Check return status from getifaddrs. - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Make sure up-to-date information is used in a follow-up when moving from becoming-master to master, duh. - clock becoming master was using obselete information, and quieten a warning. - Merge branch 'development' into main - Update Makefile.am - Check for the present of .git/index before committing to using git versioning. - Update README.md - Update README.md - Update README.md - fix a compilation error visible in Alpine Linux - fix a compilation error visible in Alpine Linux - Forgot online documentation update. - Add a new state clock_is_becoming_master and don't promote to master until at least one samples has been received after the mode clock_is_becoming_master is entered. - Update README.md - Handle a situation where a clock is made master without having any valid (recent) samples. - Add support for FreeBSD. No installer yet. - Update README.md - Drop epoll in favour of select. Stop using Linux-specific ethernet timing constructs. Remove redundant and commented-out code. - Remove many redundant #includes and do a clang format - Reinstate sample lookback when a clock has just become a bus master. Check previous samples to possibly get a better fix on the clock offset. - Forgot! - Remove all that lookback stuff. - Add a lookback to see if the master's first offset can be improved with prior estimates. Doesn't seem to make any difference. Make mastership base time the time of the first follow up after attaining mastership. Seems to be important. - Update README.md - Clock ID now stored following an announce rather than a follow_up. Require a clock to be valid before begin considered for mastership. Identification of a new master speeded up by one sample interval -- 125 ms. - Add time of accession to bus mastership to the shm. Useful for deciding how long to let the clock settle before using it. - fix the install-exec-hook stuff - Use .git/index's modification date as a dependency to generate gitversion - cosmetic - If git exists and produces a version with 'git describe --dirty' use it. Otherwise use the version from configure.ac - Clang - Begin to use git versioning - Bump for changes to conditioning - Quieten a message - Only condition a timer if it's a master. Reset it when it becomes a master. - Allow a new master to do a full resync when it becomes master. It seems that they can get lazy when not masters. - Add a time limit for checking previous offset - Add a warning in the log if sync is lost. - Check that the clock receives a positive adjustment every 10 seconds. If not, it probably has lost sync and will be resynced. - quieten a few debug messages - To mark the great simplification. - Remove all the stuff that is no longer needed. We are just monitoring Announce and Follow_Up messages, not making any Delay_Req requests. - Change dev branch. - Use _any_ follow_up message and accept only those that give a greater clock time or one that has slowed by up to 1000 ppm or so - Clang Format - Allow the clock's time to get suddenly older by any margin, but not to get suddenly younger by more than 1000 ppm. This is because the clock time could suddenly increment by the sync interval when a sync is sent. The closer the local time is to when that sync increment occurs, the greater the time difference between local time and clock time. Thus by maximising that time difference, the delay is minimised between when the sync is sent and the true local time at that instant. However, the Delay_Resp message (or the Follow_Up message) must be matched with the Sync message using sequence numbers. - Merge branch 'main' of github.com:mikebrady/nqptp into main - clang format - Update README.md - Update README.md - Update README.md - Include the IP or the master in the shm -- the user might wish to check that it's in the timing peer list. - check for mastership whenever a clock entry is garbage collected - Be a bit more careful about updating the mastership when an existing clock becomes active. It was ocassionally missing when a clock became master. - add Shared Memory Interface version to the -V output. - Clang Format - Add command line arguments -h -v -vv -vvv and -V. Bump version number. - Generate a reasonably understandable status message whenever mastership is recalculated. - clang format - Add mickey mouse averaging. Seems to work very well. - Clang - Use the Delay Response to check if a Sync has been delayed and remove samples where the Delay Resp response is not within 20 ms of the Sync. Stop clamping and guessing where the Sync should have been. Temporarily (?) turn on averaging over the last minute. More meomory and more CPU. Maybe mickey-mouse averaging would actually be better. - uninitialised variable wanring - clang and clean up some debug messages - remove all the public clock information except for the master clock. amalgamate each clock's public and private information - remove some no-longer-needed features on th kiss principle - move the debug level definition - force all timing peer list changes to be resets and not updates. never incorporate any adjustments to get to a putative master clock. needs a cleanup. - change a few debug messages. update to latest shm interface. - not using new/update stuff any more -- this migrated into SPS. - quieten a few debug messages - Selecting best clock, but checking doesn't imp,ement the tiebreaker. - try to add compensation for short timing disturbances, clamp the slew rate - Move the Sync hander into the message-handlers, add a function to generate a self clock id - working with timing peer lists, it seems - move follow-up code to a separate function. - switch to using flag bits - receives timing peer lists and sets flags accordingly. - Clang Format - Add code to tag clock IPs that belong to the clock itself. - Quieten a noisy debug message - Try to "Qualify" Announce messages coming in from clock masters. Decode them on debug level 1. - Move the port opening stuff to the utilities file and turn it inot a function. - reorganise to make it a bit easier to get around. - turn off debug messages - define and use FIELD_SIZE macro (also found in kernel.h) and use it in place of hard_wired string buffer length - Merge branch 'main' of github.com:mikebrady/nqptp into main - Drastic simplification -- no more averaging, use the same index for shared and private clock arrays, don't send a Delay_Req, just use the Follow_Up preciseOriginTime. - Update README.md - Don't try to print a UDP message it the length is -1, duh. - fix a bug causing nqptp to ignore most response messages, makeing it take longer to find a clock - Add definition of an announce message. debug_print incoming messages - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - small modifications - Not using Delay_Resp information in general. Checking if t4 and t1 are the same, that's all. - Uses epoll, still occasional error 11s, should treat Follow_Up and Delay_Resp as nearly the same. - Working, but recvmsg returns error 11 on occasion. Try epoll instead of select. - fix a few [unimportant] valgrind warnings. - move to an array of sources. still problems - Reenable garbage collection and set a timeout of one second! - Disable garbage collection. - Make the garbage collection timeout an hour. - revert mode flags on opening the shared memory - define a DEBUG_LEVEL and set it to zero - Only create a record when the first Sync is seen. Remove obselete records after about 15 seconds. Tidy up a little. - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Update README.md - Tidy some stuff up. - General cleanup, terminate cleanly on SIGINT and SIGTERM. - Start using gthe debug messages like Shairport Sync. Start cleaning up on exit. - Update nqptp.service.in - Get the installer working and improve the error messages slightly. - Add an installer. Untested. - Print the distant clock id and its local time as well as other diagnostics. - Generate local clock id correctly. Untested. - Include Clock ID in records and public record. garbage collection written but not tested. Generation of clock id needs overhaul - Add code to index each sample so that, e.g. the first few can be discarded. Add code for a nine-point Savitzky–Golay filter, but it doesn't seem useful, so commented out. - Update README.md - Stop using packed structures, increase the limit to 32 clocks. - quieten a few debug messages - Update COPYING - Update nqptp-shm-structures.h - Fix a bug resetting the samples buffer. Calculate differences each time and store them. - Don't need a C++ header file just yet. - Add new standard interface files - Seems to work pretty well. Needs tidying up! - Initial shm attempt - Seems to work pretty well. No SHM interface yet. - Transition to using SO_TIMESTAMPING and revcmsg and sendmsg. Noticed that the discontinuities when not playing seem real. - Working with recvmsg and SO_TIMESTAMPNS - Works reasonably well. Two filters -- least square line of best fit and average. Neither is great. Not using recvmsg. Signal sequence checking is crude. - Working niecely with SIOCGSTAMP reception timing. - tidied up - Can keep track of separate sources now. - include a linked list for recording each ptp source. Untested - Rename main.c to nqptp.c - Format - Initial commit from the "listener" experimental app. - Initial commit