+
+/**
+ * Check if a connection is SSL-enabled or not.
+ *
+ * @param Idx Connection index number.
+ * @return true if connection is SSL-enabled, false otherwise.
+ */
+GLOBAL bool
+Conn_UsesSSL(CONN_ID Idx)
+{
+ if (Idx < 0)
+ return false;
+ assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
+ return Conn_OPTION_ISSET(&My_Connections[Idx], CONN_SSL);
+}
+
+#endif
+
+
+#ifdef DEBUG
+
+/**
+ * Dump internal state of the "connection module".
+ */
+GLOBAL void
+Conn_DebugDump(void)
+{
+ int i;
+
+ Log(LOG_DEBUG, "Connection status:");
+ for (i = 0; i < Pool_Size; i++) {
+ if (My_Connections[i].sock == NONE)
+ continue;
+ Log(LOG_DEBUG,
+ " - %d: host=%s, lastdata=%ld, lastping=%ld, delaytime=%ld, flag=%d, options=%d, bps=%d, client=%s",
+ My_Connections[i].sock, My_Connections[i].host,
+ My_Connections[i].lastdata, My_Connections[i].lastping,
+ My_Connections[i].delaytime, My_Connections[i].flag,
+ My_Connections[i].options, My_Connections[i].bps,
+ My_Connections[i].client ? Client_ID(My_Connections[i].client) : "-");
+ }
+} /* Conn_DumpClients */
+
+#endif
+
+