cmdmon: add authdata command

Add a command to display information about authentication of NTP
sources.
This commit is contained in:
Miroslav Lichvar
2020-05-13 16:54:55 +02:00
parent 75beeaf2b0
commit 79c7384e5e
16 changed files with 318 additions and 3 deletions

View File

@@ -1249,6 +1249,24 @@ NSR_ReportSource(RPT_SourceReport *report, struct timespec *now)
}
}
/* ================================================== */
int
NSR_GetAuthReport(IPAddr *address, RPT_AuthReport *report)
{
NTP_Remote_Address rem_addr;
int slot, found;
rem_addr.ip_addr = *address;
rem_addr.port = 0;
find_slot(&rem_addr, &slot, &found);
if (!found)
return 0;
NCR_GetAuthReport(get_record(slot)->data, report);
return 1;
}
/* ================================================== */
/* The ip address is assumed to be completed on input, that is how we
identify the source record. */