diff --git a/config.c b/config.c index d48e4c0..3be21b7 100644 --- a/config.c +++ b/config.c @@ -189,6 +189,10 @@ static void scan_global_line(const char *s, struct config *cfg) dds->clockQuality.offsetScaledLogVariance = u16; + } else if (1 == sscanf(s, " free_running %d", &val)) { + + dds->free_running = val ? 1 : 0; + } else if (1 == sscanf(s, " assume_two_step %u", &val)) { *cfg->assume_two_step = val ? 1 : 0; diff --git a/default.cfg b/default.cfg index 857ffd8..fd589e8 100644 --- a/default.cfg +++ b/default.cfg @@ -10,6 +10,7 @@ domainNumber 0 clockClass 248 clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF +free_running 0 # # Port Data Set # diff --git a/ds.h b/ds.h index 4be97cb..75a5f84 100644 --- a/ds.h +++ b/ds.h @@ -33,6 +33,7 @@ struct defaultDS { UInteger8 priority2; struct ClockIdentity clockIdentity; UInteger8 domainNumber; + int free_running; }; struct dataset { diff --git a/gPTP.cfg b/gPTP.cfg index 513816a..947992b 100644 --- a/gPTP.cfg +++ b/gPTP.cfg @@ -10,6 +10,7 @@ domainNumber 0 clockClass 248 clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF +free_running 0 # # Port Data Set #