aboutsummaryrefslogtreecommitdiffstats
path: root/src/libipsec/ipsec_sa.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-07-13 11:21:25 +0200
committerTobias Brunner <tobias@strongswan.org>2012-08-08 15:41:02 +0200
commit9f7e1899a90c2ffbdbac626d4d58945460eca97c (patch)
tree36eac459d11b85db7c050b50fa5547d859f6356f /src/libipsec/ipsec_sa.h
parentf9b0c0547500d9a0f767a95b1ef821a3742d0ee4 (diff)
downloadstrongswan-9f7e1899a90c2ffbdbac626d4d58945460eca97c.tar.bz2
strongswan-9f7e1899a90c2ffbdbac626d4d58945460eca97c.tar.xz
Add methods to easily compare IPsec SAs
Diffstat (limited to 'src/libipsec/ipsec_sa.h')
-rw-r--r--src/libipsec/ipsec_sa.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libipsec/ipsec_sa.h b/src/libipsec/ipsec_sa.h
index 5cf559a38..5fd03b6e4 100644
--- a/src/libipsec/ipsec_sa.h
+++ b/src/libipsec/ipsec_sa.h
@@ -96,6 +96,35 @@ struct ipsec_sa_t {
esp_context_t *(*get_esp_context)(ipsec_sa_t *this);
/**
+ * Check if this SA matches all given parameters
+ *
+ * @param spi SPI
+ * @param dst destination address
+ * @return TRUE if this SA matches all parameters, FALSE otherwise
+ */
+ bool (*match_by_spi_dst)(ipsec_sa_t *this, u_int32_t spi, host_t *dst);
+
+ /**
+ * Check if this SA matches all given parameters
+ *
+ * @param spi SPI
+ * @param src source address
+ * @param dst destination address
+ * @return TRUE if this SA matches all parameters, FALSE otherwise
+ */
+ bool (*match_by_spi_src_dst)(ipsec_sa_t *this, u_int32_t spi, host_t *src,
+ host_t *dst);
+
+ /**
+ * Check if this SA matches all given parameters
+ *
+ * @param reqid reqid
+ * @param inbound TRUE for inbound SA, FALSE for outbound
+ * @return TRUE if this SA matches all parameters, FALSE otherwise
+ */
+ bool (*match_by_reqid)(ipsec_sa_t *this, u_int32_t reqid, bool inbound);
+
+ /**
* Destroy an ipsec_sa_t
*/
void (*destroy)(ipsec_sa_t *this);