mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:45:07 -05:00
cmdmon: update CLIENT_ACCESSES_BY_INDEX command
Add new fields from clientlog to the report and print them in chronyc. Rework the code to skip empty records in the hash table. The reply no longer has variable length, all client fields are filled even if some are empty. Reply with RPY_NULL when the facility is disabled.
This commit is contained in:
14
clientlog.h
14
clientlog.h
@@ -39,18 +39,8 @@ extern int CLG_LimitNTPResponseRate(int index);
|
||||
extern int CLG_LimitCommandResponseRate(int index);
|
||||
|
||||
/* And some reporting functions, for use by chronyc. */
|
||||
/* TBD */
|
||||
|
||||
typedef enum {
|
||||
CLG_SUCCESS, /* All is well */
|
||||
CLG_EMPTYSUBNET, /* No hosts logged in requested subnet */
|
||||
CLG_BADSUBNET, /* Subnet requested is not 0, 8, 16 or 24 bits */
|
||||
CLG_INACTIVE, /* Facility not active */
|
||||
CLG_INDEXTOOLARGE /* Node index is higher than number of nodes present */
|
||||
} CLG_Status;
|
||||
|
||||
CLG_Status
|
||||
CLG_GetClientAccessReportByIndex(int index, RPT_ClientAccessByIndex_Report *report,
|
||||
time_t now, unsigned long *n_indices);
|
||||
extern int CLG_GetNumberOfIndices(void);
|
||||
extern int CLG_GetClientAccessReportByIndex(int index, RPT_ClientAccessByIndex_Report *report, time_t now);
|
||||
|
||||
#endif /* GOT_CLIENTLOG_H */
|
||||
|
||||
Reference in New Issue
Block a user