Enforce the absolute lower limit for the announce receipt timeout.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Rename the timer for sending sync messages.

This patch renames the per-port timer in order to make room in the
namespace for a timer that detects a sync message input timeout.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add a timer implementing the sync receive timeout.

This patch adds a new timer for use in 802.1AS-2011 applications. When
running as a slave in gPTP mode, the program must monitor both announce
and sync messages from the master. If either one goes missing, then we
trigger a BMC election. The sync timeout is actually reset by a valid
sync/follow up pair of messages.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add a configuration file option for the sync receive timeout.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Announce master ambitions right away.

This patch lets a port send the first announce message one millisecond
after the port state transition, rather than waiting one announce interval.
This change is needed because it is desirable to reconfigure the time
network without delay, especially in P2P mode.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add an optional extra check on sync and follow up message ordering.

Because of packet reordering that can occur in the network, in the
hardware, or in the networking stack, a follow up message can appear
to arrive in the application before the matching sync message. As this
is a normal occurrence, and the sequenceID message field ensures
proper matching, the ptp4l program accepts out of order packets.

This patch adds an additional check using the software time stamps
from the networking stack to verify that the sync message did arrive
first. This check is only useful if the sequence IDs generated by
the master might possibly be incorrect.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add a configuration file option for the extra sync-fup check.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Merge the gPTP sync timeout branch.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>