Don't print messages in signal handler.

Only reentrant functions should be called here.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Don't include config.h in util.h

The config module is used by ptp4l only, but util is shared with other
programs.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Add string and pointer array utility functions.

Add some functions to work with strings and arrays of pointers that will
be useful later.

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

timemaster is a program that uses ptp4l and phc2sys in combination with
chronyd or ntpd to synchronize the system clock to NTP and PTP time
sources. The PTP time is provided by phc2sys and ptp4l via SHM reference
clocks to chronyd/ntpd, which can compare all time sources and use the
best sources to synchronize the system clock.

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