X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconn.h;h=f553277db3159ba208d91d7369cc1374934e14f2;hp=1707b29529883fcfe8845bf162d0a00ec9852ec0;hb=902ad91212f3d756fa898239108128d2230bdc0c;hpb=b966b2108d195374f3da47614da00555e6773778 diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h index 1707b295..f553277d 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.16 2002/06/02 17:02:34 alex Exp $ + * $Id: conn.h,v 1.25 2002/12/12 12:23:43 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,6 +47,35 @@ 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 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 INT Conn_MaxFD;