* Bump NQPTP_SHM_STRUCTURES_VERSION to 8.
* Remove the ability to handle multiple instances of AirPlay-2-capable Shairport Sync on the same system -- it seems clear that clients can not use this facility.
* Greatly simplify NQPTP by only monitoring PTP information coming from the client, ignoring all other PTP information.
* Improve the accuracy of the clock by taking correction field information into account.
* In addition to trying to restart a clock that is silent, also send a restart to a clock if the clock's grandmaster appears to have stopped.
Squashed commit of the following:
Add some experimental exploratory code.
Ignore the INSTALL document. Let INSTALL always be autogenerated.
Enhanced and corrected ptp definitions.
Fix shm name to work with FreeBSD. Update the SHM version.
Change order of includes to avoid a compilation error in FreeBSD
Fix potential bugs in finding a clock ID in a FreeBSD device.
Only try to restart a stopped clock if it's the clock itself that has stopped and not a different grandmaster. Allow fast changes for up to one second after the start of mastership.
Make the code to restart a clock a separate function and call it if a clock gets stuck. Include the correction field in the calculation of the precise origin timestamp. If a new clock is out by more than -4 seconds, treat it as a discontinuity rather than noise.
Add a net-to-host converter for 64-bit arithmetic
Mike Brady [Sat, 9 Jul 2022 09:02:35 +0000 (10:02 +0100)]
If the previous offset's grandmaster is different from the current one, discard all the smoothing stuff, including previous offset data, and work as if it was a completely new clock.
Mike Brady [Sat, 9 Jul 2022 09:00:18 +0000 (10:00 +0100)]
Add is a field to store the grandmaster the previous offset refers to. The idea is that if the new grandmaster is different from the previous one, start over.
Mike Brady [Sun, 19 Jun 2022 12:19:30 +0000 (13:19 +0100)]
Remove code for qualifying an Anounce message -- it is not used in 802.1AS. Simplify code by removing redunadant and obselete code, variables and fields.
Mike Brady [Sat, 18 Jun 2022 14:01:40 +0000 (15:01 +0100)]
Fix a bug that would cause the offset to get stuck at a fixed value, no matter what happened.
Simplify by removing clock_is_becoming_master time_of_last_sync. Watch for discontinuities to allow large changes of offset.
Mike Brady [Mon, 28 Feb 2022 06:42:25 +0000 (17:42 +1100)]
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.
Mike Brady [Fri, 31 Dec 2021 10:04:28 +0000 (10:04 +0000)]
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!
Mike Brady [Sat, 6 Nov 2021 18:29:54 +0000 (18:29 +0000)]
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.
Mike Brady [Fri, 5 Nov 2021 17:08:51 +0000 (17:08 +0000)]
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.
Mike Brady [Fri, 5 Nov 2021 12:46:39 +0000 (12:46 +0000)]
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.