/* Flags used in NTP source requests */
#define REQ_ADDSRC_ONLINE 0x1
#define REQ_ADDSRC_AUTOOFFLINE 0x2
+#define REQ_ADDSRC_IBURST 0x4
typedef struct {
IPAddr ip_addr;
chronyc's @code{online} (@pxref{online command}) command when the link has been
established, to enable measurements to start.)
+@item iburst
+On start, make four measurements over a short duration (rather than
+the usual periodic measurements).
+
@end table
@c }}}
@c {{{ tempcomp
msg->data.ntp_source.max_delay_ratio = UTI_FloatHostToNetwork(data.params.max_delay_ratio);
msg->data.ntp_source.flags = htonl(
(data.params.online ? REQ_ADDSRC_ONLINE : 0) |
- (data.params.auto_offline ? REQ_ADDSRC_AUTOOFFLINE : 0));
+ (data.params.auto_offline ? REQ_ADDSRC_AUTOOFFLINE : 0) |
+ (data.params.iburst ? REQ_ADDSRC_IBURST : 0));
result = 1;
break;
params.authkey = ntohl(rx_message->data.ntp_source.authkey);
params.online = ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_ONLINE ? 1 : 0;
params.auto_offline = ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_AUTOOFFLINE ? 1 : 0;
+ params.iburst = ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_IBURST ? 1 : 0;
params.max_delay = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay);
params.max_delay_ratio = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay_ratio);
status = NSR_AddServer(&rem_addr, ¶ms);
params.authkey = ntohl(rx_message->data.ntp_source.authkey);
params.online = ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_ONLINE ? 1 : 0;
params.auto_offline = ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_AUTOOFFLINE ? 1 : 0;
+ params.iburst = ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_IBURST ? 1 : 0;
params.max_delay = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay);
params.max_delay_ratio = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay_ratio);
status = NSR_AddPeer(&rem_addr, ¶ms);
src->params.max_delay_ratio = 16384.0;
src->params.online = 1;
src->params.auto_offline = 0;
+ src->params.iburst = 0;
result = CPS_Success;
} else if (!strncasecmp(cmd, "auto_offline", 12)) {
src->params.auto_offline = 1;
+ } else if (!strncasecmp(cmd, "iburst", 6)) {
+ src->params.iburst = 1;
+
} else {
result = CPS_BadOption;
ok = 0;
result->opmode = MD_OFFLINE;
}
+ if (params->iburst) {
+ NCR_InitiateSampleBurst(result, 4, 8);
+ }
+
result->auto_offline = params->auto_offline;
result->local_poll = params->minpoll;
int online;
int auto_offline;
int presend_minpoll;
+ int iburst;
unsigned long authkey;
double max_delay;
double max_delay_ratio;