mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 11:45:06 -05:00
Add SOCK refclock driver
This adds a support for receiving samples over unix domain socket. It's a better alternative to the SHM refclock, the resolution is not limited to microseconds and it doesn't require polling.
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
/* list of refclock drivers */
|
||||
extern RefclockDriver RCL_SHM_driver;
|
||||
extern RefclockDriver RCL_SOCK_driver;
|
||||
|
||||
struct FilterSample {
|
||||
double offset;
|
||||
@@ -116,6 +117,8 @@ RCL_AddRefclock(RefclockParameters *params)
|
||||
|
||||
if (strncmp(params->driver_name, "SHM", 4) == 0) {
|
||||
inst->driver = &RCL_SHM_driver;
|
||||
} else if (strncmp(params->driver_name, "SOCK", 4) == 0) {
|
||||
inst->driver = &RCL_SOCK_driver;
|
||||
} else {
|
||||
LOG_FATAL(LOGF_Refclock, "unknown refclock driver %s", params->driver_name);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user