+ * Implementation of connection_store_t.log_connections.
+ */
+void log_connections(private_local_connection_store_t *this, logger_t *logger, char *name)
+{
+ iterator_t *iterator;
+ connection_t *current, *found = NULL;
+
+ if (logger == NULL)
+ {
+ logger = this->logger;
+ }
+
+ logger->log(logger, CONTROL, "templates:");
+
+ iterator = this->connections->create_iterator(this->connections, TRUE);
+ while (iterator->has_next(iterator))
+ {
+ iterator->current(iterator, (void**)¤t);
+ if (!name || strcmp(name, current->get_name(current)) == 0)
+ {
+ identification_t *my_id, *other_id;
+ host_t *my_host, *other_host;
+ my_id = current->get_my_id(current);
+ other_id = current->get_other_id(current);
+ my_host = current->get_my_host(current);
+ other_host = current->get_other_host(current);
+ logger->log(logger, CONTROL, " \"%s\": %s[%s]...%s[%s]",
+ current->get_name(current),
+ my_host->get_address(my_host), my_id->get_string(my_id),
+ other_host->get_address(other_host), other_id->get_string(other_id));
+ }
+ }
+ iterator->destroy(iterator);
+}
+
+/**