With increasing unicast support, the code needs to identify unicast
messages more often. This patch replaces the open coded bit field
tests with a more readable in line helper function call.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add a batch mode, where the commands are taken from the command line
instead of the standard input.
[ RC: keep automatic variables in alphabetical order and in reverse
Christmas tree style. ]
Signed-off-by: Ethel <ethel.nilsson@est.tech>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Change the rtnl_get_ts_label() function to accept the name of the master
interface and the buffer for the slave interface directly instead of the
struct interface from config.h.
Also, rename the function to rtnl_get_ts_device().
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
As of 510777deca message layer no longer returns -ETIME. Callers of
msg_post_recv() are expected to check for missing time stamps themselves.
This patch updates the two forgotten call sites.
Fixes: 510777deca ("msg: Move the check for missing HW time stamps into caller.")
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
The majority of the callers of transport_send() use hard coded magic
numbers. This patch fixes them to use the corresponding enumerated
values instead.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Convert a hardware timestamp to the internal tmv_t representation at
the earliest possible opportunity. This allows us to:
- eliminate multiple redundant calls to timespec_to_tmv()
- use tmv_add() instead of open-coded manipulation of a struct
timespec in ts_add()
- use tmv_to_Timestamp() instead of open-coded manipulation of a
struct timespec and struct Timestamp in ts_to_Timestamp()
- use tmv_is_zero() instead of open-coded manipulation of a struct
timespec in msg_sots_valid()
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
This patch adds a new "NSM" program. The new code handles only one
outstanding NSM command at a time. If and when all four event time
stamps have arrived, the code prints the instantaneous estimated
offset without any averaging or smoothing.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>