]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.h
New configuration option "RequireAuthPing": PING-PONG on login
[ngircd-alex.git] / src / ngircd / conn.h
index a0bddaac95d090735bf652e3d3829e9436c4a376..c813729f9331e1c3897ed32f44505f851f782604 100644 (file)
@@ -7,14 +7,15 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
- *
- * Connection management (header)
  */
 
-
 #ifndef __conn_h__
 #define __conn_h__
 
+/**
+ * @file
+ * Connection management (header)
+ */
 
 #include <time.h>                      /* for time_t, see below */
 
@@ -90,6 +91,9 @@ typedef struct _Connection
 #ifdef SSL_SUPPORT
        struct ConnSSL_State ssl_state; /* SSL/GNUTLS state information */
 #endif
+#ifndef STRICT_RFC
+       long auth_ping;                 /** PING response expected on login */
+#endif
 } CONNECTION;
 
 GLOBAL CONNECTION *My_Connections;
@@ -122,14 +126,24 @@ GLOBAL PROC_STAT* Conn_GetProcStat PARAMS((CONN_ID i));
 GLOBAL bool Conn_GetCipherInfo PARAMS((CONN_ID Idx, char *buf, size_t len));
 GLOBAL bool Conn_UsesSSL PARAMS((CONN_ID Idx));
 #else
-static inline bool Conn_UsesSSL(UNUSED CONN_ID Idx) { return false; }
+static inline bool
+Conn_UsesSSL(UNUSED CONN_ID Idx)
+{ return false; }
 #endif
 
 GLOBAL long Conn_Count PARAMS((void));
 GLOBAL long Conn_CountMax PARAMS((void));
 GLOBAL long Conn_CountAccepted PARAMS((void));
 
+#ifndef STRICT_RFC
+GLOBAL long Conn_GetAuthPing PARAMS((CONN_ID Idx));
+GLOBAL void Conn_SetAuthPing PARAMS((CONN_ID Idx, long ID));
+#endif
+
+#ifdef DEBUG
+GLOBAL void Conn_DebugDump PARAMS((void));
 #endif
 
+#endif
 
 /* -eof- */