Added a get_count() method to IKE_SA manager

This commit is contained in:
Martin Willi
2011-05-16 15:24:15 +02:00
parent a836cf8085
commit 9a96ba4b6e
2 changed files with 27 additions and 3 deletions
+8 -1
View File
@@ -191,6 +191,13 @@ struct ike_sa_manager_t {
*/
void (*checkin_and_destroy) (ike_sa_manager_t* this, ike_sa_t *ike_sa);
/**
* Get the number of IKE_SAs currently registered.
*
* @return number of registered IKE_SAs
*/
u_int (*get_count)(ike_sa_manager_t *this);
/**
* Get the number of IKE_SAs which are in the connecting state.
*
@@ -204,7 +211,7 @@ struct ike_sa_manager_t {
* @param ip NULL for all, IP for half open IKE_SAs with IP
* @return number of half open IKE_SAs
*/
int (*get_half_open_count) (ike_sa_manager_t *this, host_t *ip);
u_int (*get_half_open_count) (ike_sa_manager_t *this, host_t *ip);
/**
* Delete all existing IKE_SAs and destroy them immediately.