1 |
|
/* |
2 |
< |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
3 |
< |
* ircd.h: A header for the ircd startup routines. |
2 |
> |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
|
* |
4 |
< |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
4 |
> |
* Copyright (c) 1997-2015 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 |
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 |
18 |
> |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
19 |
|
* USA |
21 |
– |
* |
22 |
– |
* $Id$ |
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" |
30 |
– |
#include "memory.h" |
31 |
– |
#include "list.h" |
33 |
|
|
33 |
– |
struct Client; |
34 |
|
|
35 |
< |
struct SetOptions |
35 |
> |
struct |
36 |
|
{ |
37 |
< |
int autoconn; /* autoconn enabled for all servers? */ |
38 |
< |
int idletime; |
37 |
> |
unsigned int maxclients; |
38 |
> |
unsigned int autoconn; /* autoconn enabled for all servers? */ |
39 |
|
int floodcount; /* Number of messages in 1 second */ |
40 |
< |
/* XXX for join flood catching - Dianora */ |
41 |
< |
int joinfloodtime; |
42 |
< |
int joinfloodcount; |
43 |
< |
/* XXX */ |
44 |
< |
int rejecttime; |
45 |
< |
int ident_timeout; /* timeout for identd lookups */ |
40 |
> |
unsigned int joinfloodtime; |
41 |
> |
unsigned int joinfloodcount; |
42 |
> |
unsigned int ident_timeout; /* timeout for identd lookups */ |
43 |
|
int spam_num; |
44 |
< |
int spam_time; |
45 |
< |
}; |
44 |
> |
unsigned int spam_time; |
45 |
> |
} GlobalSetOptions; |
46 |
|
|
47 |
|
/* |
48 |
|
* statistics structures |
70 |
|
unsigned int is_kill; /* number of kills generated on collisions */ |
71 |
|
unsigned int is_asuc; /* successful auth requests */ |
72 |
|
unsigned int is_abad; /* bad auth requests */ |
73 |
< |
}; |
77 |
< |
|
78 |
< |
extern struct ServerStatistics ServerStats; |
73 |
> |
} ServerStats; |
74 |
|
|
75 |
< |
|
81 |
< |
struct Counter |
75 |
> |
struct |
76 |
|
{ |
77 |
|
uint64_t totalrestartcount; /* Total client count ever */ |
78 |
|
unsigned int myserver; /* my servers */ |
84 |
|
unsigned int max_tot; /* MAX global clients */ |
85 |
|
unsigned int max_loc_con; /* MAX local connection count (clients + server) */ |
86 |
|
unsigned int max_loc_cli; /* XXX This is redundant - Max local client count */ |
87 |
< |
}; |
94 |
< |
|
95 |
< |
extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */ |
87 |
> |
} Count; |
88 |
|
|
89 |
< |
struct ServerState_t |
89 |
> |
struct |
90 |
|
{ |
91 |
< |
int foreground; |
92 |
< |
}; |
91 |
> |
unsigned int foreground; |
92 |
> |
} server_state; |
93 |
|
|
102 |
– |
extern struct ServerState_t server_state; |
94 |
|
|
95 |
+ |
#ifdef HAVE_LIBGEOIP |
96 |
+ |
extern GeoIP *geoip_ctx; |
97 |
+ |
#endif |
98 |
|
extern char **myargv; |
105 |
– |
extern char ircd_platform[PLATFORMLEN]; |
106 |
– |
extern char *get_ircd_platform(char *); |
99 |
|
extern const char *infotext[]; |
100 |
|
extern const char *serno; |
101 |
|
extern const char *ircd_version; |
102 |
|
extern const char *logFileName; |
103 |
|
extern const char *pidFileName; |
104 |
< |
extern int dorehash; |
105 |
< |
extern int doremotd; |
106 |
< |
extern struct Counter Count; |
104 |
> |
extern unsigned int dorehash; |
105 |
> |
extern unsigned int doremotd; |
106 |
> |
extern struct event event_write_links_file; |
107 |
|
extern struct timeval SystemTime; |
108 |
|
#define CurrentTime SystemTime.tv_sec |
109 |
< |
extern int default_server_capabs; |
118 |
< |
#ifdef HAVE_LIBCRYPTO |
119 |
< |
extern int bio_spare_fd; |
120 |
< |
#endif /* HAVE_LIBCRYPTO */ |
121 |
< |
|
109 |
> |
extern unsigned int 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 |
|
|
127 |
– |
extern dlink_list unknown_list; /* unknown clients ON this server only */ |
128 |
– |
extern dlink_list local_client_list; /* local clients only ON this server */ |
129 |
– |
extern dlink_list serv_list; /* local servers to this server ONLY */ |
130 |
– |
extern dlink_list global_serv_list; /* global servers on the network */ |
131 |
– |
extern dlink_list oper_list; /* our opers, duplicated in local_client_list */ |
132 |
– |
extern int rehashed_klines; |
115 |
|
extern void set_time(void); |
116 |
|
#endif |