aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-07-08 14:08:31 +0200
committerMartin Willi <martin@strongswan.org>2009-07-09 15:25:15 +0200
commit7527f43c76fcf81a60439034732cfb7a9af9930e (patch)
tree3e5ba1e30b56956759662b2067778e792b96f1d5 /src
parenta40cc76bc72a4d09405be6c03d19dc1bf184bdcd (diff)
downloadstrongswan-7527f43c76fcf81a60439034732cfb7a9af9930e.tar.bz2
strongswan-7527f43c76fcf81a60439034732cfb7a9af9930e.tar.xz
added new listener callbacks to track SAs
Diffstat (limited to 'src')
-rw-r--r--src/charon/bus/listeners/listener.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/charon/bus/listeners/listener.h b/src/charon/bus/listeners/listener.h
index fea3a6997..1cab0a26b 100644
--- a/src/charon/bus/listeners/listener.h
+++ b/src/charon/bus/listeners/listener.h
@@ -108,6 +108,46 @@ struct listener_t {
diffie_hellman_t *dh, chunk_t nonce_i, chunk_t nonce_r);
/**
+ * Hook called if an IKE_SA gets up or down.
+ *
+ * @param ike_sa IKE_SA coming up/going down
+ * @param up TRUE for an up event, FALSE for a down event
+ * @return TRUE to stay registered, FALSE to unregister
+ */
+ bool (*ike_updown)(listener_t *this, ike_sa_t *ike_sa, bool up);
+
+ /**
+ * Hook called when an IKE_SA gets rekeyed.
+ *
+ * @param old rekeyed IKE_SA getting obsolete
+ * @param new new IKE_SA replacing old
+ * @return TRUE to stay registered, FALSE to unregister
+ */
+ bool (*ike_rekey)(listener_t *this, ike_sa_t *old, ike_sa_t *new);
+
+ /**
+ * Hook called when a CHILD_SA gets up or down.
+ *
+ * @param ike_sa IKE_SA containing the handled CHILD_SA
+ * @param child_sa CHILD_SA coming up/going down
+ * @param up TRUE for an up event, FALSE for a down event
+ * @return TRUE to stay registered, FALSE to unregister
+ */
+ bool (*child_updown)(listener_t *this, ike_sa_t *ike_sa,
+ child_sa_t *child_sa, bool up);
+
+ /**
+ * Hook called when an CHILD_SA gets rekeyed.
+ *
+ * @param ike_sa IKE_SA containing the rekeyed CHILD_SA
+ * @param old rekeyed CHILD_SA getting obsolete
+ * @param new new CHILD_SA replacing old
+ * @return TRUE to stay registered, FALSE to unregister
+ */
+ bool (*child_rekey)(listener_t *this, ike_sa_t *ike_sa,
+ child_sa_t *old, child_sa_t *new);
+
+ /**
* Hook called to invoke additional authorization rules.
*
* An authorization hook gets invoked several times: After each