return TRUE;
}
+METHOD(listener_t, ike_state_change, bool,
+ private_xpc_channels_t *this, ike_sa_t *ike_sa, ike_sa_state_t state)
+{
+ if (state == IKE_CONNECTING)
+ {
+ entry_t *entry;
+ uintptr_t sa;
+
+ sa = ike_sa->get_unique_id(ike_sa);
+ this->lock->read_lock(this->lock);
+ entry = this->channels->get(this->channels, (void*)sa);
+ if (entry)
+ {
+ xpc_object_t msg;
+
+ msg = xpc_dictionary_create(NULL, NULL, 0);
+ xpc_dictionary_set_string(msg, "type", "event");
+ xpc_dictionary_set_string(msg, "event", "connecting");
+ xpc_connection_send_message(entry->conn, msg);
+ xpc_release(msg);
+ }
+ this->lock->unlock(this->lock);
+ }
+ return TRUE;
+}
+
METHOD(listener_t, child_updown, bool,
private_xpc_channels_t *this, ike_sa_t *ike_sa,
child_sa_t *child_sa, bool up)
.listener = {
.ike_updown = _ike_updown,
.ike_rekey = _ike_rekey,
+ .ike_state_change = _ike_state_change,
.child_updown = _child_updown,
},
.add = _add,