X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fconn.h;h=b9812156b83d077c1b63ed466c1c23b62fd1040e;hb=d9e3f834d7fac9de948b311f833e0c7638e86a12;hp=5a8d3e10cedd5fa830f635e16f743980c3ce0a40;hpb=05839597bf9cc74b0e390ad5c6a6b747697f7abe;p=ngircd-alex.git diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h index 5a8d3e10..b9812156 100644 --- a/src/ngircd/conn.h +++ b/src/ngircd/conn.h @@ -2,16 +2,15 @@ * ngIRCd -- The Next Generation IRC Daemon * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de) * - * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen - * der GNU General Public License (GPL), wie von der Free Software Foundation - * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2 - * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. - * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste - * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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. * - * $Id: conn.h,v 1.19 2002/11/02 22:58:19 alex Exp $ + * $Id: conn.h,v 1.26 2002/12/18 13:50:22 alex Exp $ * - * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header) + * Connection management (header) */ @@ -19,7 +18,12 @@ #define __conn_h__ -#include +#include /* wg. time_t, s.u. */ + + +#ifdef USE_ZLIB +#define CONN_ZIP 4 /* Kompression mit zlib */ +#endif typedef INT CONN_ID; @@ -28,6 +32,9 @@ typedef INT CONN_ID; GLOBAL VOID Conn_Init PARAMS((VOID )); GLOBAL VOID Conn_Exit PARAMS(( VOID )); +GLOBAL INT Conn_InitListeners PARAMS(( VOID )); +GLOBAL VOID Conn_ExitListeners PARAMS(( VOID )); + GLOBAL BOOLEAN Conn_NewListener PARAMS(( CONST UINT Port )); GLOBAL VOID Conn_Handler PARAMS(( VOID )); @@ -40,17 +47,39 @@ GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN GLOBAL VOID Conn_UpdateIdle PARAMS(( CONN_ID Idx )); GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx )); GLOBAL time_t Conn_LastPing PARAMS(( CONN_ID Idx )); +GLOBAL time_t Conn_StartTime PARAMS(( CONN_ID Idx )); +GLOBAL INT Conn_SendQ PARAMS(( CONN_ID Idx )); +GLOBAL INT Conn_RecvQ PARAMS(( CONN_ID Idx )); +GLOBAL LONG Conn_SendMsg PARAMS(( CONN_ID Idx )); +GLOBAL LONG Conn_RecvMsg PARAMS(( CONN_ID Idx )); +GLOBAL LONG Conn_SendBytes PARAMS(( CONN_ID Idx )); +GLOBAL LONG Conn_RecvBytes PARAMS(( CONN_ID Idx )); GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds )); GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx )); GLOBAL VOID Conn_ClearFlags PARAMS(( VOID )); -GLOBAL BOOLEAN Conn_Flag PARAMS(( CONN_ID Idx )); -GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx )); +GLOBAL INT Conn_Flag PARAMS(( CONN_ID Idx )); +GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx, INT Flag )); + +GLOBAL VOID Conn_SetServer PARAMS(( CONN_ID Idx, INT ConfServer )); GLOBAL CONN_ID Conn_First PARAMS(( VOID )); GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx )); +GLOBAL VOID Conn_SetOption PARAMS(( CONN_ID Idx, INT Option )); +GLOBAL VOID Conn_UnsetOption PARAMS(( CONN_ID Idx, INT Option )); +GLOBAL INT Conn_Options PARAMS(( CONN_ID Idx )); + +#ifdef USE_ZLIB +GLOBAL BOOLEAN Conn_InitZip PARAMS(( CONN_ID Idx )); +GLOBAL LONG Conn_SendBytesZip PARAMS(( CONN_ID Idx )); +GLOBAL LONG Conn_RecvBytesZip PARAMS(( CONN_ID Idx )); +#endif + +GLOBAL VOID Conn_ResetWCounter PARAMS(( VOID )); +GLOBAL LONG Conn_WCounter PARAMS(( VOID )); + GLOBAL INT Conn_MaxFD;