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