diff options
author | Martin Willi <martin@revosec.ch> | 2013-09-23 12:10:07 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-10-11 10:23:17 +0200 |
commit | b08967d6d8b9377ac5cf375113c345b9b52d4f49 (patch) | |
tree | 7df0bd586c72b537411a1b397bffd18f6b732195 /src/libipsec/ipsec_sa_mgr.h | |
parent | d7083b65419633a9f3569d71e4461efaa20a262e (diff) | |
download | strongswan-b08967d6d8b9377ac5cf375113c345b9b52d4f49.tar.bz2 strongswan-b08967d6d8b9377ac5cf375113c345b9b52d4f49.tar.xz |
libipsec: Support usage statistics and query_sa() on IPsec SAs
Diffstat (limited to 'src/libipsec/ipsec_sa_mgr.h')
-rw-r--r-- | src/libipsec/ipsec_sa_mgr.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libipsec/ipsec_sa_mgr.h b/src/libipsec/ipsec_sa_mgr.h index e9ce5ee8f..8c234cefa 100644 --- a/src/libipsec/ipsec_sa_mgr.h +++ b/src/libipsec/ipsec_sa_mgr.h @@ -109,6 +109,23 @@ struct ipsec_sa_mgr_t { bool encap, bool new_encap, mark_t mark); /** + * Query the number of bytes processed by an SA from the SAD. + * + * @param src source address for this SA + * @param dst destination address for this SA + * @param spi SPI allocated by us or remote peer + * @param protocol protocol for this SA (ESP/AH) + * @param mark optional mark for this SA + * @param[out] bytes the number of bytes processed by SA + * @param[out] packets number of packets processed by SA + * @param[out] time last (monotonic) time of SA use + * @return SUCCESS if operation completed + */ + status_t (*query_sa)(ipsec_sa_mgr_t *this, host_t *src, host_t *dst, + u_int32_t spi, u_int8_t protocol, mark_t mark, + u_int64_t *bytes, u_int64_t *packets, time_t *time); + + /** * Delete a previously added SA * * @param spi SPI of the SA |