update usetime only if usebytes increase

This commit is contained in:
Andreas Steffen
2009-07-30 23:19:42 +02:00
parent 2ad51539f6
commit 3f720dc7c3
4 changed files with 73 additions and 14 deletions
+6 -4
View File
@@ -240,17 +240,19 @@ struct child_sa_t {
* Get last use time of the CHILD_SA.
*
* @param inbound TRUE for inbound traffic, FALSE for outbound
* @param update update time of last use via kernel query
* @return time of last use in seconds
*/
u_int32_t (*get_usetime)(child_sa_t *this, bool inbound);
u_int32_t (*get_usetime)(child_sa_t *this, bool inbound, bool update);
/**
* Get number of bytes processed by CHILD_SA.
*
* @param inbound TRUE for inbound traffic, FALSE for outbound
* @return number of processed bytes
* @param inbound TRUE for inbound traffic, FALSE for outbound
* @param[out] change TRUE if change since last query, FALSE else
* @return number of processed bytes
*/
u_int64_t (*get_usebytes)(child_sa_t *this, bool inbound);
u_int64_t (*get_usebytes)(child_sa_t *this, bool inbound, bool *change);
/**
* Get the traffic selectors list added for one side.