]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/conn.h
- fixed user mode propagation over server-links (IRC operator, away, ...)
[ngircd-alex.git] / src / ngircd / conn.h
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  * Please read the file COPYING, README and AUTHORS for more information.
10  *
11  * $Id: conn.h,v 1.26 2002/12/18 13:50:22 alex Exp $
12  *
13  * Connection management (header)
14  */
15
16
17 #ifndef __conn_h__
18 #define __conn_h__
19
20
21 #include <time.h>                       /* wg. time_t, s.u. */
22
23
24 #ifdef USE_ZLIB
25 #define CONN_ZIP 4                      /* Kompression mit zlib */
26 #endif
27
28
29 typedef INT CONN_ID;
30
31
32 GLOBAL VOID Conn_Init PARAMS((VOID ));
33 GLOBAL VOID Conn_Exit PARAMS(( VOID ));
34
35 GLOBAL INT Conn_InitListeners PARAMS(( VOID ));
36 GLOBAL VOID Conn_ExitListeners PARAMS(( VOID ));
37
38 GLOBAL BOOLEAN Conn_NewListener PARAMS(( CONST UINT Port ));
39
40 GLOBAL VOID Conn_Handler PARAMS(( VOID ));
41
42 GLOBAL BOOLEAN Conn_Write PARAMS(( CONN_ID Idx, CHAR *Data, INT Len ));
43 GLOBAL BOOLEAN Conn_WriteStr PARAMS(( CONN_ID Idx, CHAR *Format, ... ));
44
45 GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ));
46
47 GLOBAL VOID Conn_UpdateIdle PARAMS(( CONN_ID Idx ));
48 GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx ));
49 GLOBAL time_t Conn_LastPing PARAMS(( CONN_ID Idx ));
50 GLOBAL time_t Conn_StartTime PARAMS(( CONN_ID Idx ));
51 GLOBAL INT Conn_SendQ PARAMS(( CONN_ID Idx ));
52 GLOBAL INT Conn_RecvQ PARAMS(( CONN_ID Idx ));
53 GLOBAL LONG Conn_SendMsg PARAMS(( CONN_ID Idx ));
54 GLOBAL LONG Conn_RecvMsg PARAMS(( CONN_ID Idx ));
55 GLOBAL LONG Conn_SendBytes PARAMS(( CONN_ID Idx ));
56 GLOBAL LONG Conn_RecvBytes PARAMS(( CONN_ID Idx ));
57
58 GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
59 GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
60
61 GLOBAL VOID Conn_ClearFlags PARAMS(( VOID ));
62 GLOBAL INT Conn_Flag PARAMS(( CONN_ID Idx ));
63 GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx, INT Flag ));
64
65 GLOBAL VOID Conn_SetServer PARAMS(( CONN_ID Idx, INT ConfServer ));
66
67 GLOBAL CONN_ID Conn_First PARAMS(( VOID ));
68 GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx ));
69
70 GLOBAL VOID Conn_SetOption PARAMS(( CONN_ID Idx, INT Option ));
71 GLOBAL VOID Conn_UnsetOption PARAMS(( CONN_ID Idx, INT Option ));
72 GLOBAL INT Conn_Options PARAMS(( CONN_ID Idx ));
73
74 #ifdef USE_ZLIB
75 GLOBAL BOOLEAN Conn_InitZip PARAMS(( CONN_ID Idx ));
76 GLOBAL LONG Conn_SendBytesZip PARAMS(( CONN_ID Idx ));
77 GLOBAL LONG Conn_RecvBytesZip PARAMS(( CONN_ID Idx ));
78 #endif
79
80 GLOBAL VOID Conn_ResetWCounter PARAMS(( VOID ));
81 GLOBAL LONG Conn_WCounter PARAMS(( VOID ));
82
83
84 GLOBAL INT Conn_MaxFD;
85
86
87 #endif
88
89
90 /* -eof- */