1 |
/* |
2 |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
3 |
* ircd.h: A header for the ircd startup routines. |
4 |
* |
5 |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
6 |
* |
7 |
* This program is free software; you can redistribute it and/or modify |
8 |
* it under the terms of the GNU General Public License as published by |
9 |
* the Free Software Foundation; either version 2 of the License, or |
10 |
* (at your option) any later version. |
11 |
* |
12 |
* This program is distributed in the hope that it will be useful, |
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
* GNU General Public License for more details. |
16 |
* |
17 |
* You should have received a copy of the GNU General Public License |
18 |
* along with this program; if not, write to the Free Software |
19 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
20 |
* USA |
21 |
* |
22 |
* $Id$ |
23 |
*/ |
24 |
|
25 |
#ifndef INCLUDED_ircd_h |
26 |
#define INCLUDED_ircd_h |
27 |
|
28 |
#include "ircd_defs.h" |
29 |
#include "config.h" |
30 |
|
31 |
|
32 |
struct SetOptions |
33 |
{ |
34 |
int autoconn; /* autoconn enabled for all servers? */ |
35 |
int floodcount; /* Number of messages in 1 second */ |
36 |
int joinfloodtime; |
37 |
int joinfloodcount; |
38 |
int ident_timeout; /* timeout for identd lookups */ |
39 |
int spam_num; |
40 |
int spam_time; |
41 |
}; |
42 |
|
43 |
/* |
44 |
* statistics structures |
45 |
*/ |
46 |
struct ServerStatistics |
47 |
{ |
48 |
uint64_t is_cbs; /* bytes sent to clients */ |
49 |
uint64_t is_cbr; /* bytes received from clients */ |
50 |
uint64_t is_sbs; /* bytes sent to servers */ |
51 |
uint64_t is_sbr; /* bytes received from servers */ |
52 |
|
53 |
time_t is_cti; /* time spent connected by clients */ |
54 |
time_t is_sti; /* time spent connected by servers */ |
55 |
|
56 |
unsigned int is_cl; /* number of client connections */ |
57 |
unsigned int is_sv; /* number of server connections */ |
58 |
unsigned int is_ni; /* connection but no idea who it was */ |
59 |
unsigned int is_ac; /* connections accepted */ |
60 |
unsigned int is_ref; /* accepts refused */ |
61 |
unsigned int is_unco; /* unknown commands */ |
62 |
unsigned int is_wrdi; /* command going in wrong direction */ |
63 |
unsigned int is_unpf; /* unknown prefix */ |
64 |
unsigned int is_empt; /* empty message */ |
65 |
unsigned int is_num; /* numeric message */ |
66 |
unsigned int is_kill; /* number of kills generated on collisions */ |
67 |
unsigned int is_asuc; /* successful auth requests */ |
68 |
unsigned int is_abad; /* bad auth requests */ |
69 |
}; |
70 |
|
71 |
struct Counter |
72 |
{ |
73 |
uint64_t totalrestartcount; /* Total client count ever */ |
74 |
unsigned int myserver; /* my servers */ |
75 |
unsigned int oper; /* Opers */ |
76 |
unsigned int local; /* Local Clients */ |
77 |
unsigned int total; /* total clients */ |
78 |
unsigned int invisi; /* invisible clients */ |
79 |
unsigned int max_loc; /* MAX local clients */ |
80 |
unsigned int max_tot; /* MAX global clients */ |
81 |
unsigned int max_loc_con; /* MAX local connection count (clients + server) */ |
82 |
unsigned int max_loc_cli; /* XXX This is redundant - Max local client count */ |
83 |
}; |
84 |
|
85 |
struct ServerState_t |
86 |
{ |
87 |
int foreground; |
88 |
}; |
89 |
|
90 |
|
91 |
extern char **myargv; |
92 |
extern const char *infotext[]; |
93 |
extern const char *serno; |
94 |
extern const char *ircd_version; |
95 |
extern const char *logFileName; |
96 |
extern const char *pidFileName; |
97 |
extern int dorehash; |
98 |
extern int doremotd; |
99 |
extern struct Counter Count; |
100 |
extern struct ServerStatistics ServerStats; |
101 |
extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */ |
102 |
extern struct ServerState_t server_state; |
103 |
extern struct timeval SystemTime; |
104 |
#define CurrentTime SystemTime.tv_sec |
105 |
extern int default_server_capabs; |
106 |
extern unsigned int splitmode; |
107 |
extern unsigned int splitchecking; |
108 |
extern unsigned int split_users; |
109 |
extern unsigned int split_servers; |
110 |
|
111 |
extern int rehashed_klines; |
112 |
extern void set_time(void); |
113 |
#endif |