Commit Graph

12 Commits (master)

Author SHA1 Message Date
Richard Cochran a8f742528e interface: Hide the implementation details.
Now that a complete functional API is in place, there is no need to expose
the inner workings of the network interface data type.  This patch converts
it into an opaque type while leaving the list marker visible to users
through a simple form of "friendly exposition".

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2020-03-04 09:46:41 -08:00
Richard Cochran e43a76cbe6 Convert call sites to the proper method for setting the time stamping label.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2020-03-04 09:46:00 -08:00
Richard Cochran a8df585e04 Convert call sites to the proper method for initializing the time stamping label.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
2020-03-04 09:45:43 -08:00
Richard Cochran 34945679fe Convert call sites to the proper method for getting interface names.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2020-03-04 09:45:10 -08:00
Richard Cochran 40480f3b28 util: Make a useful helper function more public.
The function, str2addr(), will be needed by the upcoming unicast
client code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-07-01 06:27:47 -07:00
Richard Cochran ccfeb3b092 msg: Introduce a helper to test for unicast messages.
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>
2018-05-25 15:28:35 -07:00
Ethel b2a36350bb nsm: Allow commands on command line.
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>
2018-04-20 07:12:56 -07:00
Miroslav Lichvar 742f878821 rtnl: remove dependency on config.h.
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>
2018-04-19 07:41:11 -07:00
Richard Cochran 7a76c36b34 nsm, pmc: Check for missing HW time stamps.
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>
2018-04-18 18:44:28 -07:00
Richard Cochran a1c5e3f2ed transport: Fix callers to pass a proper enumeration value.
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>
2018-04-13 22:29:05 -07:00
Michael Brown 29a99ad513 msg: Represent hw_timestamp "ts" field as tmv_t
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>
2018-03-17 19:04:28 -07:00
Richard Cochran ab8dc20cf7 nsm: Implement the NetSync Monitor query.
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>
2018-03-08 07:20:42 -08:00