This patch adds a new configuation option that enables transparent
clock mode. When TC mode is specified, the configured delay mechanism
must also match. The legacy behavior of upgrading a multi-port clock
from OC to BC is preserved.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Any code that wants to call one_step() needs to link with the static
global 'assume_two_step'. This patch moves that variable's definition
from ptp4l.c to msg.c. Not only is that file the more natural choice
(since the variable is used on msg.h) but also this allows other
programs to call the one_step() function.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
When running multiple instances of ptp4l or phc2sys, it's difficult to
tell which log message belongs to which instance. Add new options to
ptp4l and phc2sys which can specify a tag for all messages printed to
the standard output or system log, so messages from different instances
can have different tags.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
This patch provides a way to use the entire table of configuration options
as "long" command line switches.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
The code that determines the index of the PHC device is useful to all
kinds of clock devices.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
There is no need for the 'ifaces' parameter since the list of network
interfaces is already present in the configuration.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
With the new configuration API, there is no need to pass the default data
set. Instead, the clock code can read the configuration directly. This
patch simplifies the clock create method by removing the 'dds' parameter
and moving the code that initialized the data set into the clock module.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
There is no need to have a function to get this information as
we can easily obtain it when the interface is first created.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Now that all of the legacy, open coded configuration fields are gone,
we can follow a normal create/destroy pattern for the configuration.
This patch add the new method and converts the programs to use it.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Now we have debug messages in the configuration code. Therefore set up
the print levels immediately after parsing the command line and the file,
so that those messages have a chance to be seen.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This conversion is not straightforward due to the fact that these options
can take a value of "ASAP" or a number. We check for the special ASAP
case in a helper function and leave the numbers to the generic code.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>