ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/ircd.h
Revision: 1858
Committed: Thu Apr 25 15:00:52 2013 UTC (12 years, 4 months ago) by michael
Content type: text/x-chdr
File size: 3920 byte(s)
Log Message:
- Added basic support for libGeoIP
- Added exempt configuration option to resv{} blocks

File Contents

# User Rev Content
1 adx 30 /*
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 knight 31 * $Id$
23 adx 30 */
24    
25     #ifndef INCLUDED_ircd_h
26     #define INCLUDED_ircd_h
27    
28     #include "ircd_defs.h"
29 michael 912 #include "config.h"
30 adx 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 michael 896 /*
44     * statistics structures
45     */
46 michael 1011 struct ServerStatistics
47     {
48 michael 1143 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 michael 1011
53 michael 1143 time_t is_cti; /* time spent connected by clients */
54     time_t is_sti; /* time spent connected by servers */
55 michael 948
56 michael 1143 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 michael 896 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 michael 1143 unsigned int is_num; /* numeric message */
66 michael 896 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 adx 30 struct Counter
72     {
73 michael 948 uint64_t totalrestartcount; /* Total client count ever */
74 michael 1143 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 adx 30 };
84    
85     struct ServerState_t
86     {
87     int foreground;
88     };
89    
90    
91 michael 1858 #ifdef HAVE_LIBGEOIP
92     extern GeoIP *geoip_ctx;
93     #endif
94 adx 30 extern char **myargv;
95     extern const char *infotext[];
96     extern const char *serno;
97     extern const char *ircd_version;
98     extern const char *logFileName;
99     extern const char *pidFileName;
100     extern int dorehash;
101     extern int doremotd;
102     extern struct Counter Count;
103 michael 1798 extern struct ServerStatistics ServerStats;
104     extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */
105     extern struct ServerState_t server_state;
106 adx 30 extern struct timeval SystemTime;
107     #define CurrentTime SystemTime.tv_sec
108     extern int default_server_capabs;
109 michael 1013 extern unsigned int splitmode;
110     extern unsigned int splitchecking;
111     extern unsigned int split_users;
112 adx 30 extern unsigned int split_servers;
113    
114     extern int rehashed_klines;
115     extern void set_time(void);
116     #endif

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision