1 |
/* |
2 |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
* |
4 |
* Copyright (c) 1997-2014 ircd-hybrid development team |
5 |
* |
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 |
/*! \file ircd.h |
23 |
* \brief A header for the ircd startup routines. |
24 |
* \version $Id$ |
25 |
*/ |
26 |
|
27 |
|
28 |
#ifndef INCLUDED_ircd_h |
29 |
#define INCLUDED_ircd_h |
30 |
|
31 |
#include "ircd_defs.h" |
32 |
#include "config.h" |
33 |
|
34 |
|
35 |
struct |
36 |
{ |
37 |
unsigned int autoconn; /* autoconn enabled for all servers? */ |
38 |
int floodcount; /* Number of messages in 1 second */ |
39 |
unsigned int joinfloodtime; |
40 |
unsigned int joinfloodcount; |
41 |
unsigned int ident_timeout; /* timeout for identd lookups */ |
42 |
int spam_num; |
43 |
unsigned int spam_time; |
44 |
} GlobalSetOptions; |
45 |
|
46 |
/* |
47 |
* statistics structures |
48 |
*/ |
49 |
struct ServerStatistics |
50 |
{ |
51 |
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 |
|
56 |
time_t is_cti; /* time spent connected by clients */ |
57 |
time_t is_sti; /* time spent connected by servers */ |
58 |
|
59 |
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 |
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 |
unsigned int is_num; /* numeric message */ |
69 |
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 |
struct Counter |
75 |
{ |
76 |
uint64_t totalrestartcount; /* Total client count ever */ |
77 |
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 |
} Count; |
87 |
|
88 |
struct |
89 |
{ |
90 |
unsigned int foreground; |
91 |
} server_state; |
92 |
|
93 |
|
94 |
#ifdef HAVE_LIBGEOIP |
95 |
extern GeoIP *geoip_ctx; |
96 |
#endif |
97 |
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 event event_write_links_file; |
106 |
extern struct ServerStatistics ServerStats; |
107 |
extern struct timeval SystemTime; |
108 |
#define CurrentTime SystemTime.tv_sec |
109 |
extern int unsigned default_server_capabs; |
110 |
extern unsigned int splitmode; |
111 |
extern unsigned int splitchecking; |
112 |
extern unsigned int split_users; |
113 |
extern unsigned int split_servers; |
114 |
|
115 |
extern void set_time(void); |
116 |
#endif |