]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.h
SECURITY: Fixed a message handling bug which could crash the daemon.
[ngircd-alex.git] / src / ngircd / conn.h
index 9a794a1e2236cf351817816c75149aea57a63cab..3bb76ab39d13379f24ee469a2a97a91deb500ca7 100644 (file)
@@ -8,7 +8,7 @@
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
  *
- * $Id: conn.h,v 1.43 2007/04/04 21:52:12 fw Exp $
+ * $Id: conn.h,v 1.46 2008/02/26 22:04:17 fw Exp $
  *
  * Connection management (header)
  */
@@ -38,6 +38,8 @@ typedef int CONN_ID;
 #include "defines.h"
 #include "resolve.h"
 #include "array.h"
+#include "tool.h"
+#include "ng_ipaddr.h"
 
 #ifdef ZLIB
 #include <zlib.h>
@@ -54,11 +56,12 @@ typedef struct _ZipData
 typedef struct _Connection
 {
        int sock;                       /* Socket handle */
-       struct sockaddr_in addr;        /* Client address */
+       ng_ipaddr_t addr;               /* Client address */
        RES_STAT res_stat;              /* Status of resolver process */
        char host[HOST_LEN];            /* Hostname */
        array rbuf;                     /* Read buffer */
        array wbuf;                     /* Write buffer */
+       time_t signon;                  /* Signon ("connect") time */
        time_t lastdata;                /* Last activity */
        time_t lastping;                /* Last PING */
        time_t lastprivmsg;             /* Last PRIVMSG */
@@ -88,7 +91,6 @@ GLOBAL void Conn_ExitListeners PARAMS(( void ));
 
 GLOBAL void Conn_Handler PARAMS(( void ));
 
-GLOBAL bool Conn_Write PARAMS(( CONN_ID Idx, char *Data, size_t Len ));
 GLOBAL bool Conn_WriteStr PARAMS(( CONN_ID Idx, char *Format, ... ));
 
 GLOBAL void Conn_Close PARAMS(( CONN_ID Idx, char *LogMsg, char *FwdMsg, bool InformClient ));