ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/ircd.h
Revision: 948
Committed: Tue Jul 21 17:34:06 2009 UTC (16 years, 1 month ago) by michael
Content type: text/x-chdr
Original Path: ircd-hybrid-7.2/include/ircd.h
File size: 4351 byte(s)
Log Message:
- lp64\llp64\ilp32 portability fixes

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 #include "tools.h"
31     #include "memory.h"
32    
33     struct Client;
34     struct dlink_list;
35    
36     struct SetOptions
37     {
38     int autoconn; /* autoconn enabled for all servers? */
39     int idletime;
40     int floodcount; /* Number of messages in 1 second */
41     /* XXX for join flood catching - Dianora */
42     int joinfloodtime;
43     int joinfloodcount;
44     /* XXX */
45     int rejecttime;
46     int ident_timeout; /* timeout for identd lookups */
47     int spam_num;
48     int spam_time;
49     };
50    
51 michael 896 /*
52     * statistics structures
53     */
54     struct ServerStatistics {
55     uint64_t is_cbs; /* bytes sent to clients */
56     uint64_t is_cbr; /* bytes received from clients */
57     uint64_t is_sbs; /* bytes sent to servers */
58     uint64_t is_sbr; /* bytes received from servers */
59     time_t is_cti; /* time spent connected by clients */
60     time_t is_sti; /* time spent connected by servers */
61 michael 948
62     unsigned int is_cl; /* number of client connections */
63     unsigned int is_sv; /* number of server connections */
64     unsigned int is_ni; /* connection but no idea who it was */
65    
66 michael 896 unsigned int is_ac; /* connections accepted */
67     unsigned int is_ref; /* accepts refused */
68     unsigned int is_unco; /* unknown commands */
69     unsigned int is_wrdi; /* command going in wrong direction */
70     unsigned int is_unpf; /* unknown prefix */
71     unsigned int is_empt; /* empty message */
72     unsigned int is_num; /* numeric message */
73     unsigned int is_kill; /* number of kills generated on collisions */
74     unsigned int is_asuc; /* successful auth requests */
75     unsigned int is_abad; /* bad auth requests */
76     };
77    
78     extern struct ServerStatistics ServerStats;
79    
80    
81 adx 30 struct Counter
82     {
83     int myserver; /* my servers */
84     int oper; /* Opers */
85     int local; /* Local Clients */
86     int total; /* total clients */
87     int invisi; /* invisible clients */
88     int max_loc; /* MAX local clients */
89     int max_tot; /* MAX global clients */
90 michael 948 uint64_t totalrestartcount; /* Total client count ever */
91 adx 30 };
92    
93     extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */
94    
95     struct ServerState_t
96     {
97     int foreground;
98     };
99    
100     extern struct ServerState_t server_state;
101    
102     extern char **myargv;
103     extern char ircd_platform[PLATFORMLEN];
104     extern char *get_ircd_platform(char *);
105     extern const char *infotext[];
106     extern const char *serno;
107     extern const char *ircd_version;
108     extern const char *logFileName;
109     extern const char *pidFileName;
110     extern int dorehash;
111     extern int doremotd;
112     extern struct Counter Count;
113     extern struct timeval SystemTime;
114     #define CurrentTime SystemTime.tv_sec
115     extern time_t nextconnect;
116     extern int default_server_capabs;
117     #ifdef HAVE_LIBCRYPTO
118     extern int bio_spare_fd;
119     #endif /* HAVE_LIBCRYPTO */
120    
121     extern int splitmode;
122     extern int splitchecking;
123     extern int split_users;
124     extern unsigned int split_servers;
125    
126     extern dlink_list unknown_list; /* unknown clients ON this server only */
127     extern dlink_list local_client_list; /* local clients only ON this server */
128     extern dlink_list serv_list; /* local servers to this server ONLY */
129     extern dlink_list global_serv_list; /* global servers on the network */
130     extern dlink_list oper_list; /* our opers, duplicated in local_client_list */
131     extern int rehashed_klines;
132     extern void set_time(void);
133     #endif

Properties

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