mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
clientlog: save time of last hit with sub-second resolution
Instead of time_t use a 32-bit fixed point representation with 4-bit fraction to save the time of the last hit. The rate can now be measured up to 16 packets per second. Maximum interval between hits is about 4 years.
This commit is contained in:
@@ -33,14 +33,14 @@
|
||||
|
||||
extern void CLG_Initialise(void);
|
||||
extern void CLG_Finalise(void);
|
||||
extern int CLG_LogNTPAccess(IPAddr *client, time_t now);
|
||||
extern int CLG_LogCommandAccess(IPAddr *client, time_t now);
|
||||
extern int CLG_LogNTPAccess(IPAddr *client, struct timeval *now);
|
||||
extern int CLG_LogCommandAccess(IPAddr *client, struct timeval *now);
|
||||
extern int CLG_LimitNTPResponseRate(int index);
|
||||
extern int CLG_LimitCommandResponseRate(int index);
|
||||
|
||||
/* And some reporting functions, for use by chronyc. */
|
||||
|
||||
extern int CLG_GetNumberOfIndices(void);
|
||||
extern int CLG_GetClientAccessReportByIndex(int index, RPT_ClientAccessByIndex_Report *report, time_t now);
|
||||
extern int CLG_GetClientAccessReportByIndex(int index, RPT_ClientAccessByIndex_Report *report, struct timeval *now);
|
||||
|
||||
#endif /* GOT_CLIENTLOG_H */
|
||||
|
||||
Reference in New Issue
Block a user