Make udp_physical_addr() and udp_protocol_addr() static.

They aren't used outside udp.c

Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
Make functions and structs dealing with string literals const correct.

This allows the compiler to check if someone writes into string
literals.

Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
Clarify units used in clock stepping constants.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Set printf format attribute for print().

This allows gcc to check format strings used in pr_* calls.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Fix new -Wformat warnings.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Version 1.4

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
port: adjust peer delay calculation using neighborRateRatio

Previouly the peer delay was not taking into account the
frequency offset between the local clock and the peer's clock.
Reset neighborRateRatio to 1.0 in port_nrate_initialize().

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
config: Add min_neighbor_prop_delay configuration variable

When peer delay is < min_neighbor_prop_delay the port is flagged
as non 802.1AS capable. min_neighbor_prop_delay defaults to -20ms.

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
Fix conversion of cumulativeScaledRateOffset in TIME_STATUS_NP.

This fixes reporting of negative offsets.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Initialize clock rate ratio.

This fixes cumulativeScaledRateOffset reported in TIME_STATUS_NP before
the rate ratio is updated from port.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
pmc: print cumulativeScaledRateOffset as offset.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Restrict SET actions to UDS port.

Setting GRANDMASTER_SETTINGS_NP is allowed only from UDS, but
PORT_DATA_SET can be set from any port. Move the port check to
clock_manage(), so all clock and port SET actions are restricted
to the UDS port.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>