ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/conf.h
(Generate patch)

Comparing:
ircd-hybrid-8/include/conf.h (file contents), Revision 1364 by michael, Sun Apr 22 19:28:21 2012 UTC vs.
ircd-hybrid/trunk/include/conf.h (file contents), Revision 7793 by michael, Mon Oct 17 19:28:52 2016 UTC

# Line 1 | Line 1
1   /*
2 < *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  conf.h: A header for the configuration functions.
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (C) 2005 by the past and present ircd coders, and others.
4 > *  Copyright (c) 1997-2016 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
# Line 16 | Line 15
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 < #ifndef INCLUDED_s_conf_h
23 < #define INCLUDED_s_conf_h
22 > /*! \file conf.h
23 > * \brief A header for the configuration functions.
24 > * \version $Id$
25 > */
26 >
27 > #ifndef INCLUDED_conf_h
28 > #define INCLUDED_conf_h
29   #include "config.h"
28 #ifdef HAVE_LIBCRYPTO
29 #include <openssl/rsa.h>
30 #endif
31 #include "ircd_defs.h"
32 #include "motd.h"               /* MessageFile */
30   #include "client.h"
31 < #include "hook.h"
31 > #include "conf_class.h"
32 > #include "tls.h"
33  
34  
35 < struct Client;
35 > #define CONF_NOREASON "<No reason supplied>"
36 >
37 > /* MaskItem->flags */
38 > enum
39 > {
40 >  CONF_FLAGS_NO_TILDE        = 0x00000001U,
41 >  CONF_FLAGS_NEED_IDENTD     = 0x00000002U,
42 >  CONF_FLAGS_EXEMPTKLINE     = 0x00000004U,
43 >  CONF_FLAGS_NOLIMIT         = 0x00000008U,
44 >  CONF_FLAGS_SPOOF_IP        = 0x00000010U,
45 >  CONF_FLAGS_SPOOF_NOTICE    = 0x00000020U,
46 >  CONF_FLAGS_REDIR           = 0x00000040U,
47 >  CONF_FLAGS_CAN_FLOOD       = 0x00000080U,
48 >  CONF_FLAGS_NEED_PASSWORD   = 0x00000100U,
49 >  CONF_FLAGS_ALLOW_AUTO_CONN = 0x00000200U,
50 >  CONF_FLAGS_ENCRYPTED       = 0x00000400U,
51 >  CONF_FLAGS_IN_DATABASE     = 0x00000800U,
52 >  CONF_FLAGS_EXEMPTRESV      = 0x00001000U,
53 >  CONF_FLAGS_SSL             = 0x00002000U,
54 >  CONF_FLAGS_WEBIRC          = 0x00004000U,
55 >  CONF_FLAGS_EXEMPTXLINE     = 0x00008000U
56 > };
57 >
58 > /* Macros for struct MaskItem */
59 > #define IsConfWebIRC(x)           ((x)->flags & CONF_FLAGS_WEBIRC)
60 > #define IsNoTilde(x)              ((x)->flags & CONF_FLAGS_NO_TILDE)
61 > #define IsConfCanFlood(x)         ((x)->flags & CONF_FLAGS_CAN_FLOOD)
62 > #define IsNeedPassword(x)         ((x)->flags & CONF_FLAGS_NEED_PASSWORD)
63 > #define IsNeedIdentd(x)           ((x)->flags & CONF_FLAGS_NEED_IDENTD)
64 > #define IsConfExemptKline(x)      ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
65 > #define IsConfExemptXline(x)      ((x)->flags & CONF_FLAGS_EXEMPTXLINE)
66 > #define IsConfExemptLimits(x)     ((x)->flags & CONF_FLAGS_NOLIMIT)
67 > #define IsConfExemptResv(x)       ((x)->flags & CONF_FLAGS_EXEMPTRESV)
68 > #define IsConfDoSpoofIp(x)        ((x)->flags & CONF_FLAGS_SPOOF_IP)
69 > #define IsConfSpoofNotice(x)      ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
70 > #define IsConfAllowAutoConn(x)    ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
71 > #define SetConfAllowAutoConn(x)   ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
72 > #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
73 > #define IsConfRedir(x)            ((x)->flags & CONF_FLAGS_REDIR)
74 > #define IsConfSSL(x)              ((x)->flags & CONF_FLAGS_SSL)
75 > #define IsConfDatabase(x)         ((x)->flags & CONF_FLAGS_IN_DATABASE)
76 > #define SetConfDatabase(x)        ((x)->flags |= CONF_FLAGS_IN_DATABASE)
77  
39 extern struct Callback *client_check_cb;
78  
79 < struct conf_parser_context
79 > enum maskitem_type
80   {
81 <  unsigned int boot;
82 <  unsigned int pass;
83 <  FILE *conf_file;
81 >  CONF_CLIENT  = 1 << 0,
82 >  CONF_SERVER  = 1 << 1,
83 >  CONF_KLINE   = 1 << 2,
84 >  CONF_DLINE   = 1 << 3,
85 >  CONF_EXEMPT  = 1 << 4,
86 >  CONF_OPER    = 1 << 5
87   };
88  
89 < extern struct conf_parser_context conf_parser_ctx;
89 > #define IsConfKill(x)           ((x)->type == CONF_KLINE)
90 > #define IsConfClient(x)         ((x)->type == CONF_CLIENT)
91  
92 < typedef enum
93 < {  
94 <  CONF_TYPE,
95 <  CLASS_TYPE,
96 <  OPER_TYPE,
97 <  CLIENT_TYPE,
98 <  SERVER_TYPE,
99 <  HUB_TYPE,
58 <  LEAF_TYPE,
59 <  KLINE_TYPE,
60 <  DLINE_TYPE,
61 <  EXEMPTDLINE_TYPE,
62 <  CLUSTER_TYPE,
63 <  RKLINE_TYPE,
64 <  RXLINE_TYPE,
65 <  XLINE_TYPE,    
66 <  ULINE_TYPE,
67 <  GLINE_TYPE,
68 <  CRESV_TYPE,    
69 <  NRESV_TYPE,
70 <  GDENY_TYPE,
71 <  SERVICE_TYPE
72 < } ConfType;
92 > enum
93 > {
94 >  NOT_AUTHORIZED = -1,
95 >  I_LINE_FULL    = -2,
96 >  TOO_MANY       = -3,
97 >  BANNED_CLIENT  = -4,
98 >  TOO_FAST       = -5
99 > };
100  
101   struct split_nuh_item
102   {
# Line 85 | Line 112 | struct split_nuh_item
112    size_t hostsize;
113   };
114  
115 < struct ConfItem
89 < {
90 <  dlink_node node;      /* link into known ConfItems of this type */
91 <
92 <  char *name;           /* Primary key */
93 <  void *regexpname;
94 <  unsigned int flags;
95 <  ConfType type;
96 < };
97 <
98 < /*
99 < * MatchItem - used for XLINE and ULINE types
100 < */
101 < struct MatchItem
115 > struct MaskItem
116   {
117 <  char *user;           /* Used for ULINE only */
118 <  char *host;           /* Used for ULINE only */
119 <  char *reason;
120 <  char *oper_reason;
121 <  int action;           /* used for uline */
122 <  int count;            /* How many times this matchitem has been matched */
123 <  int ref_count;        /* How many times is this matchitem in use */
124 <  int illegal;          /* Should it be deleted when possible? */
125 <  time_t           hold;     /* Hold action until this time (calendar time) */
126 < };
127 <
128 < struct AccessItem
129 < {
130 <  dlink_node node;
131 <  unsigned int     dns_failed;
132 <  unsigned int     dns_pending;
133 <  unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
134 <  unsigned int     flags;
135 <  unsigned int     modes;
136 <  unsigned int     port;
137 <  int              clients;  /* Number of *LOCAL* clients using this */
138 <  int              bits;
139 <  int              type;
140 <  struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
141 <  struct irc_ssaddr ipnum;      /* ip to connect to */
142 <  char *           host;     /* host part of user@host */
143 <  char *           passwd;
144 <  char *           spasswd;  /* Password to send. */
131 <  char *           reason;
132 <  char *           oper_reason;
133 <  char *           user;     /* user part of user@host */
134 <  time_t           hold;     /* Hold action until this time (calendar time) */
135 <  struct ConfItem *class_ptr;  /* Class of connection */
136 <  int              aftype;
137 < #ifdef HAVE_LIBCRYPTO
138 <  /* certs */
139 <  char *cipher_list;
140 <  char *           rsa_public_key_file;
141 <  RSA *            rsa_public_key;
142 < #endif
143 <  void *regexuser;
144 <  void *regexhost;
145 < };
146 <
147 < struct ClassItem
148 < {
149 <  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
150 <  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
151 <  unsigned int max_sendq;
152 <  int con_freq;
153 <  int ping_freq;
154 <  int ping_warning;
155 <  int max_total;
156 <  int max_local;
157 <  int max_global;
158 <  int max_ident;
159 <  int max_perip;
160 <  int curr_user_count;
161 <  int cidr_bitlen_ipv4;
162 <  int cidr_bitlen_ipv6;
163 <  int number_per_cidr;
164 <  int active;
117 >  dlink_node         node;
118 >  dlink_list         leaf_list;
119 >  dlink_list         hub_list;
120 >  enum maskitem_type type;
121 >  unsigned int       dns_failed;
122 >  unsigned int       dns_pending;
123 >  unsigned int       flags;
124 >  unsigned int       modes;
125 >  unsigned int       port;
126 >  unsigned int       aftype;
127 >  unsigned int       active;
128 >  unsigned int       htype;
129 >  unsigned int       ref_count;  /* Number of *LOCAL* clients using this */
130 >  int                bits;
131 >  uintmax_t          until;     /* Hold action until this time (calendar time) */
132 >  uintmax_t          setat;
133 >  struct irc_ssaddr  bind;  /* ip to bind to for outgoing connect */
134 >  struct irc_ssaddr  addr;  /* ip to connect to */
135 >  struct ClassItem  *class;  /* Class of connection */
136 >  char              *name;
137 >  char              *user;     /* user part of user@host */
138 >  char              *host;     /* host part of user@host */
139 >  char              *passwd;
140 >  char              *spasswd;  /* Password to send. */
141 >  char              *reason;
142 >  char              *certfp;
143 >  char              *whois;
144 >  char              *cipher_list;
145   };
146  
147   struct CidrItem
148   {
149    dlink_node node;
150    struct irc_ssaddr mask;
151 <  int number_on_this_cidr;
151 >  unsigned int number_on_this_cidr;
152   };
153  
154 < #define ConFreq(x)      ((x)->con_freq)
155 < #define PingFreq(x)     ((x)->ping_freq)
156 < #define PingWarning(x)  ((x)->ping_warning)
157 < #define MaxTotal(x)     ((x)->max_total)
158 < #define MaxGlobal(x)    ((x)->max_global)
159 < #define MaxLocal(x)     ((x)->max_local)
180 < #define MaxIdent(x)     ((x)->max_ident)
181 < #define MaxPerIp(x)     ((x)->max_perip)
182 < #define MaxSendq(x)     ((x)->max_sendq)
183 < #define CurrUserCount(x) ((x)->curr_user_count)
184 < #define CidrBitlenIPV4(x)       ((x)->cidr_bitlen_ipv4)
185 < #define CidrBitlenIPV6(x)       ((x)->cidr_bitlen_ipv6)
186 < #define NumberPerCidr(x) ((x)->number_per_cidr)
187 <
188 < #define ClassPtr(x)      ((x)->class_ptr)
189 <
190 <
191 < #define CONF_ILLEGAL            0x80000000
192 < #define CONF_RESERVED           0x00000001
193 < #define CONF_CLIENT             0x00000002
194 < #define CONF_SERVER             0x00000004
195 < #define CONF_OPERATOR           0x00000008
196 < #define CONF_KILL               0x00000010
197 < #define CONF_KLINE              CONF_KILL
198 < #define CONF_CLASS              0x00000020
199 < #define CONF_LEAF               0x00000040
200 < #define CONF_LISTEN_PORT        0x00000080
201 < #define CONF_HUB                0x00000100
202 < #define CONF_EXEMPTKLINE        0x00000200
203 < #define CONF_NOLIMIT            0x00000400
204 < #define CONF_DLINE              0x00000800
205 < #define CONF_XLINE              0x00001000
206 < #define CONF_ULINE              0x00002000
207 < #define CONF_EXEMPTDLINE        0x00004000
208 < #define CONF_GLINE              0x00008000
209 < #define CONF_SERVICE            0x00010000
210 <
211 < #define CONF_SERVER_MASK       CONF_SERVER
212 < #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
213 <
214 < /* XXX temporary hack */
215 < #define CONF_CRESV              0x80000001
216 < #define CONF_NRESV              0x80000002
217 <
218 < #define IsConfIllegal(x)        ((x)->status & CONF_ILLEGAL)
219 < #define SetConfIllegal(x)       ((x)->status |= CONF_ILLEGAL)
220 < #define IsConfServer(x)         ((x)->status == CONF_SERVER)
221 < #define SetConfServer(x)        ((x)->status = CONF_SERVER)
222 < #define IsConfOperator(x)       ((x)->status & CONF_OPERATOR)
223 < #define IsConfHub(x)            ((x)->status == CONF_HUB)
224 < #define SetConfHub(x)           ((x)->status = CONF_HUB)
225 < #define IsConfLeaf(x)           ((x)->status == CONF_LEAF)
226 < #define SetConfLeaf(x)          ((x)->status = CONF_LEAF)
227 < #define IsConfHubOrLeaf(x)      ((x)->status & (CONF_HUB|CONF_LEAF))
228 < #define IsConfKill(x)           ((x)->status == CONF_KILL)
229 < #define IsConfClient(x)         ((x)->status & CONF_CLIENT)
230 < #define IsConfTypeOfClient(x)   ((x)->status & CONF_CLIENT_MASK)
231 < #define IsConfUline(x)          ((x)->status & CONF_ULINE)
232 < #define IsConfXline(x)          ((x)->status & CONF_XLINE)
233 < #define IsConfGline(x)          ((x)->status == CONF_GLINE)
234 <
235 < /* AccessItem->flags */
236 <
237 < /* Generic flags... */
238 < /* access flags... */
239 < #define CONF_FLAGS_DO_IDENTD            0x00000001
240 < #define CONF_FLAGS_LIMIT_IP             0x00000002
241 < #define CONF_FLAGS_NO_TILDE             0x00000004
242 < #define CONF_FLAGS_NEED_IDENTD          0x00000008
243 < #define CONF_FLAGS_NOMATCH_IP           0x00000010
244 < #define CONF_FLAGS_EXEMPTKLINE          0x00000020
245 < #define CONF_FLAGS_NOLIMIT              0x00000040
246 < #define CONF_FLAGS_SPOOF_IP             0x00000080
247 < #define CONF_FLAGS_SPOOF_NOTICE         0x00000100
248 < #define CONF_FLAGS_REDIR                0x00000200
249 < #define CONF_FLAGS_EXEMPTGLINE          0x00000400
250 < #define CONF_FLAGS_CAN_FLOOD            0x00000800
251 < #define CONF_FLAGS_NEED_PASSWORD        0x00001000
252 < /* server flags */
253 < #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00002000
254 < #define CONF_FLAGS_ENCRYPTED            0x00004000
255 < #define CONF_FLAGS_TEMPORARY            0x00008000
256 < #define CONF_FLAGS_BURST_AWAY           0x00010000
257 < #define CONF_FLAGS_EXEMPTRESV           0x00020000
258 < #define CONF_FLAGS_TOPICBURST           0x00040000
259 < #define CONF_FLAGS_SSL                  0x00080000
260 <
261 < /* Macros for struct AccessItem */
262 < #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
263 < #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
264 < #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
265 < #define IsNeedPassword(x)       ((x)->flags & CONF_FLAGS_NEED_PASSWORD)
266 < #define IsNeedIdentd(x)         ((x)->flags & CONF_FLAGS_NEED_IDENTD)
267 < #define IsNoMatchIp(x)          ((x)->flags & CONF_FLAGS_NOMATCH_IP)
268 < #define IsConfExemptKline(x)    ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
269 < #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
270 < #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
271 < #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
272 < #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
273 < #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
274 < #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
275 < #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
276 < #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
277 < #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
278 < #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
279 < #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
280 < #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
281 < #define IsConfTemporary(x)      ((x)->flags & CONF_FLAGS_TEMPORARY)
282 < #define SetConfTemporary(x)     ((x)->flags |= CONF_FLAGS_TEMPORARY)
283 < #define IsConfRedir(x)          ((x)->flags & CONF_FLAGS_REDIR)
284 < #define IsConfAwayBurst(x)      ((x)->flags & CONF_FLAGS_BURST_AWAY)
285 < #define SetConfAwayBurst(x)     ((x)->flags |= CONF_FLAGS_BURST_AWAY)
286 < #define ClearConfAwayBurst(x)   ((x)->flags &= ~CONF_FLAGS_BURST_AWAY)
287 < #define IsConfTopicBurst(x)     ((x)->flags & CONF_FLAGS_TOPICBURST)
288 < #define SetConfTopicBurst(x)    ((x)->flags |= CONF_FLAGS_TOPICBURST)
289 < #define ClearConfTopicBurst(x)  ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
290 < #define IsConfSSL(x)      ((x)->flags & CONF_FLAGS_SSL)
291 < #define SetConfSSL(x)     ((x)->flags |= CONF_FLAGS_SSL)
292 < #define ClearConfSSL(x)   ((x)->flags &= ~CONF_FLAGS_SSL)
293 <
294 < /* shared/cluster server entry types
295 < * These defines are used for both shared and cluster.
296 < */
297 < #define SHARED_KLINE            0x0001
298 < #define SHARED_UNKLINE          0x0002
299 < #define SHARED_XLINE            0x0004
300 < #define SHARED_UNXLINE          0x0008
301 < #define SHARED_RESV             0x0010
302 < #define SHARED_UNRESV           0x0020
303 < #define SHARED_LOCOPS           0x0040
304 < #define SHARED_DLINE            0x0080
305 < #define SHARED_UNDLINE          0x0100
306 < #define SHARED_ALL              (SHARED_KLINE | SHARED_UNKLINE |\
307 <                                 SHARED_XLINE | SHARED_UNXLINE |\
308 <                                 SHARED_RESV | SHARED_UNRESV |\
309 <                                 SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
310 <
311 < /* gline acl entry actions */
312 < #define GDENY_BLOCK             0x1
313 < #define GDENY_REJECT            0x2
154 > struct conf_parser_context
155 > {
156 >  unsigned int boot;
157 >  unsigned int pass;
158 >  FILE *conf_file;
159 > };
160  
161 < struct config_file_entry
161 > struct config_general_entry
162   {
163 <  const char *dpath;          /* DPATH if set from command line */
163 >  const char *dpath;
164 >  const char *mpath;
165 >  const char *spath;
166    const char *configfile;
167    const char *klinefile;
168    const char *xlinefile;
321  const char *rxlinefile;
322  const char *rklinefile;
169    const char *dlinefile;
170 <  const char *glinefile;
171 <  const char *cresvfile;
172 <  const char *nresvfile;
173 <
174 <  char *logpath;
175 <  char *operlog;
176 <  char *egdpool_path;
177 <  char *service_name;
178 <
333 <  MessageFile motd;
334 <  MessageFile opermotd;
335 <  MessageFile linksfile;
336 <
337 <  int gline_min_cidr;
338 <  int gline_min_cidr6;
339 <  int dots_in_ident;
340 <  int failed_oper_notice;
341 <  int anti_spam_exit_message_time;
170 >  const char *resvfile;
171 >
172 >  unsigned int dline_min_cidr;
173 >  unsigned int dline_min_cidr6;
174 >  unsigned int kline_min_cidr;
175 >  unsigned int kline_min_cidr6;
176 >  unsigned int dots_in_ident;
177 >  unsigned int failed_oper_notice;
178 >  unsigned int anti_spam_exit_message_time;
179    unsigned int max_accept;
180    unsigned int max_watch;
181 <  int max_nick_time;
181 >  unsigned int whowas_history_length;
182 >  unsigned int away_time;
183 >  unsigned int away_count;
184 >  unsigned int max_nick_time;
185    unsigned int max_nick_changes;
186 <  int ts_max_delta;
187 <  int ts_warn_delta;
188 <  int anti_nick_flood;
189 <  int kline_with_reason;
190 <  int warn_no_nline;
191 <  int invisible_on_connect;
192 <  int stats_e_disabled;
193 <  int stats_o_oper_only;
194 <  int stats_k_oper_only;
195 <  int stats_i_oper_only;
196 <  int stats_P_oper_only;
197 <  int short_motd;
198 <  int no_oper_flood;
199 <  int true_no_oper_flood;
200 <  int oper_pass_resv;
201 <  int glines;
202 <  int hide_spoof_ips;
203 <  int burst_away;
204 <  int use_whois_actually;
205 <  int tkline_expire_notices;
206 <  int opers_bypass_callerid;
207 <  int ignore_bogus_ts;
208 <  char *kline_reason;
209 <  int pace_wait;
210 <  int pace_wait_simple;
211 <  int gline_time;
212 <  int gline_logging;
213 <  int oper_only_umodes;
214 <  int oper_umodes;
215 <  int max_targets;
216 <  int caller_id_wait;
217 <  int min_nonwildcard;
378 <  int min_nonwildcard_simple;
379 <  int kill_chase_time_limit;
380 <  int default_floodcount;
381 <  int client_flood;
382 <  /* 0 == don't use throttle... */
383 <  int throttle_time;
384 <  int use_egd;
385 <  int ping_cookie;
386 <  int disable_auth;
387 <  int disable_remote;
186 >  unsigned int ts_max_delta;
187 >  unsigned int ts_warn_delta;
188 >  unsigned int anti_nick_flood;
189 >  unsigned int warn_no_connect_block;
190 >  unsigned int invisible_on_connect;
191 >  unsigned int stats_e_disabled;
192 >  unsigned int stats_i_oper_only;
193 >  unsigned int stats_k_oper_only;
194 >  unsigned int stats_m_oper_only;
195 >  unsigned int stats_o_oper_only;
196 >  unsigned int stats_P_oper_only;
197 >  unsigned int stats_u_oper_only;
198 >  unsigned int short_motd;
199 >  unsigned int no_oper_flood;
200 >  unsigned int tkline_expire_notices;
201 >  unsigned int opers_bypass_callerid;
202 >  unsigned int ignore_bogus_ts;
203 >  unsigned int pace_wait;
204 >  unsigned int pace_wait_simple;
205 >  unsigned int oper_only_umodes;
206 >  unsigned int oper_umodes;
207 >  unsigned int max_targets;
208 >  unsigned int caller_id_wait;
209 >  unsigned int min_nonwildcard;
210 >  unsigned int min_nonwildcard_simple;
211 >  unsigned int kill_chase_time_limit;
212 >  unsigned int default_floodcount;
213 >  unsigned int throttle_count;
214 >  unsigned int throttle_time;
215 >  unsigned int ping_cookie;
216 >  unsigned int disable_auth;
217 >  unsigned int cycle_on_host_change;
218   };
219  
220   struct config_channel_entry
221   {
222 <  int disable_fake_channels;
223 <  int restrict_channels;
224 <  int disable_local_channels;
225 <  int use_except;
226 <  int use_invex;
227 <  int use_knock;
228 <  int knock_delay;
229 <  int knock_delay_channel;
222 >  unsigned int disable_fake_channels;
223 >  unsigned int invite_client_count;
224 >  unsigned int invite_client_time;
225 >  unsigned int invite_delay_channel;
226 >  unsigned int invite_expire_time;
227 >  unsigned int knock_client_count;
228 >  unsigned int knock_client_time;
229 >  unsigned int knock_delay_channel;
230 >  unsigned int max_invites;
231    unsigned int max_bans;
232 <  unsigned int max_chans_per_user;
233 <  int no_create_on_split;
234 <  int no_join_on_split;
404 <  int quiet_on_ban;
405 <  int burst_topicwho;
406 <  int default_split_server_count;
407 <  int default_split_user_count;
232 >  unsigned int max_channels;
233 >  unsigned int default_join_flood_count;
234 >  unsigned int default_join_flood_time;
235   };
236  
237 < struct config_server_hide
237 > struct config_serverhide_entry
238   {
239    char *hidden_name;
240 <  int flatten_links;
241 <  int hide_servers;
242 <  int links_delay;
243 <  int links_disabled;
244 <  int hidden;
245 <  int disable_hidden;
246 <  int hide_server_ips;
240 >  char *flatten_links_file;
241 >  unsigned int flatten_links;
242 >  unsigned int flatten_links_delay;
243 >  unsigned int disable_remote_commands;
244 >  unsigned int hide_servers;
245 >  unsigned int hide_services;
246 >  unsigned int hidden;
247 >  unsigned int hide_server_ips;
248   };
249  
250 < struct server_info
250 > struct config_serverinfo_entry
251   {
252    char *sid;
253    char *name;
254    char *description;
255    char *network_name;
256    char *network_desc;
257 < #ifdef HAVE_LIBCRYPTO
257 >  char *libgeoip_ipv4_database_file;
258 >  char *libgeoip_ipv6_database_file;
259    char *rsa_private_key_file;
260 <  RSA *rsa_private_key;
261 <  SSL_CTX *server_ctx;
262 <  SSL_CTX *client_ctx;
263 < #endif
264 <  int hub;
260 >  char *ssl_certificate_file;
261 >  char *ssl_dh_param_file;
262 >  char *ssl_dh_elliptic_curve;
263 >  char *ssl_cipher_list;
264 >  char *ssl_message_digest_algorithm;
265 >  tls_context_t tls_ctx;
266 >  tls_md_t message_digest_algorithm;
267 >  unsigned int hub;
268 >  unsigned int default_max_clients;
269 >  unsigned int max_nick_length;
270 >  unsigned int max_topic_length;
271 >  unsigned int libgeoip_database_options;
272 >  unsigned int specific_ipv4_vhost;
273 >  unsigned int specific_ipv6_vhost;
274    struct irc_ssaddr ip;
275    struct irc_ssaddr ip6;
438  unsigned int max_clients;
439  int specific_ipv4_vhost;
440  int specific_ipv6_vhost;
441  struct sockaddr_in dns_host;
442  int can_use_v6;
276   };
277  
278 < struct admin_info
278 > struct config_admin_entry
279   {
280    char *name;
281    char *description;
282    char *email;
283   };
284  
285 < struct logging_entry
285 > struct config_log_entry
286   {
287    unsigned int use_logging;
288   };
289  
290 < extern dlink_list gdeny_items;
291 < extern dlink_list class_items;
292 < extern dlink_list server_items;
293 < extern dlink_list cluster_items;
294 < extern dlink_list hub_items;
295 < extern dlink_list rxconf_items;
296 < extern dlink_list rkconf_items;
297 < extern dlink_list leaf_items;
298 < extern dlink_list service_items;
299 < extern dlink_list temporary_klines;
300 < extern dlink_list temporary_dlines;
301 < extern dlink_list temporary_glines;
302 < extern dlink_list temporary_xlines;
470 < extern dlink_list temporary_rxlines;
471 < extern dlink_list temporary_rklines;
472 < extern struct logging_entry ConfigLoggingEntry;
473 < extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
474 < extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
475 < extern struct config_server_hide ConfigServerHide; /* defined in s_conf.c */
476 < extern struct server_info ServerInfo;       /* defined in ircd.c */
477 < extern struct admin_info AdminInfo;        /* defined in ircd.c */
478 < extern int valid_wild_card(struct Client *, int, int, ...);
290 > extern dlink_list flatten_links;
291 > extern dlink_list connect_items;
292 > extern dlink_list operator_items;
293 > extern struct conf_parser_context conf_parser_ctx;
294 > extern struct config_log_entry ConfigLog;
295 > extern struct config_general_entry ConfigGeneral;
296 > extern struct config_channel_entry ConfigChannel;
297 > extern struct config_serverhide_entry ConfigServerHide;
298 > extern struct config_serverinfo_entry ConfigServerInfo;
299 > extern struct config_admin_entry ConfigAdminInfo;
300 >
301 > extern int valid_wild_card_simple(const char *);
302 > extern int valid_wild_card(int, ...);
303   /* End GLOBAL section */
304  
305 < extern unsigned int get_sendq(struct Client *);
482 < extern const char *get_client_class(struct Client *);
483 < extern int get_client_ping(struct Client *, int *);
484 < extern void check_class(void);
485 < extern void init_class(void);
486 < extern struct ConfItem *find_class(const char *);
487 < extern void init_ip_hash_table(void);
488 < extern void count_ip_hash(unsigned int *, uint64_t *);
489 < extern void remove_one_ip(struct irc_ssaddr *);
490 < extern struct ConfItem *make_conf_item(ConfType type);
491 < extern void free_access_item(struct AccessItem *);
305 > extern struct MaskItem *conf_make(enum maskitem_type);
306   extern void read_conf_files(int);
307 < extern int attach_conf(struct Client *, struct ConfItem *);
307 > extern int attach_conf(struct Client *, struct MaskItem *);
308   extern int attach_connect_block(struct Client *, const char *, const char *);
309 + extern int check_client(struct Client *);
310  
496 extern int detach_conf(struct Client *, ConfType);
311  
312 < extern struct ConfItem *find_conf_name(dlink_list *, const char *, ConfType);
313 < extern struct ConfItem *find_conf_exact(ConfType, const char *, const char *, const char *);
500 < extern struct AccessItem *find_kill(struct Client *);
501 < extern struct AccessItem *find_gline(struct Client *);
312 > extern void detach_conf(struct Client *, enum maskitem_type);
313 > extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
314   extern int conf_connect_allowed(struct irc_ssaddr *, int);
315 < extern char *oper_privs_as_string(const unsigned int);
315 > extern const char *oper_privs_as_string(const unsigned int);
316   extern void split_nuh(struct split_nuh_item *);
317 < extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
318 <                                                const char *, const char *, int);
319 < extern struct ConfItem *find_exact_name_conf(ConfType, const struct Client *, const char *,
508 <                                             const char *, const char *);
509 < extern void delete_conf_item(struct ConfItem *);
510 < extern void report_confitem_types(struct Client *, ConfType, int);
317 > extern struct MaskItem *operator_find(const struct Client *, const char *);
318 > extern struct MaskItem *connect_find(const char *, const char *, int (*)(const char *, const char *));
319 > extern void conf_free(struct MaskItem *);
320   extern void yyerror(const char *);
321 < extern void write_conf_line(struct Client *, struct ConfItem *,
513 <                            const char *, time_t);
514 < extern int remove_conf_line(ConfType, struct Client *, const char *,
515 <                            const char *);
516 < extern void add_temp_line(struct ConfItem *);
321 > extern void conf_error_report(const char *);
322   extern void cleanup_tklines(void *);
323 < extern const char *get_conf_name(ConfType);
324 < extern int rehash(int);
325 < extern int conf_add_server(struct ConfItem *, const char *);
521 < extern void conf_add_class_to_conf(struct ConfItem *, const char *);
522 <
523 < /* XXX consider moving these into csvlib.h */
524 < extern void parse_csv_file(FILE *, ConfType);
323 > extern void conf_rehash(int);
324 > extern void lookup_confhost(struct MaskItem *);
325 > extern void conf_add_class_to_conf(struct MaskItem *, const char *);
326  
327   extern const char *get_oper_name(const struct Client *);
328  
528 extern void *map_to_conf(struct ConfItem *);
529 extern struct ConfItem *unmap_conf_item(void *);
329   /* XXX should the parse_aline stuff go into another file ?? */
531 #define AWILD 0x1               /* check wild cards */
532 #define NOUSERLOOKUP 0x2 /* Don't lookup the user@host on /rkline nick */
330   extern int parse_aline(const char *, struct Client *, int, char **,
331 <                       int, char **, char **, time_t *, char **, char **);
535 < extern int valid_comment(struct Client *, char *, int);
536 <
331 >                       char **, char **, uintmax_t *, char **, char **);
332  
333   #define TK_SECONDS 0
334   #define TK_MINUTES 1
335 < extern time_t valid_tkline(const char *, int);
336 < extern int match_conf_password(const char *, const struct AccessItem *);
335 > extern uintmax_t valid_tkline(const char *, const int);
336 > extern int match_conf_password(const char *, const struct MaskItem *);
337  
338 < #define NOT_AUTHORIZED    (-1)
544 < #define I_LINE_FULL       (-2)
545 < #define TOO_MANY          (-3)
546 < #define BANNED_CLIENT     (-4)
547 < #define TOO_FAST          (-5)
548 <
549 < #define CLEANUP_TKLINES_TIME 60
550 <
551 < extern void cluster_a_line(struct Client *,
552 <                           const char *, int, int, const char *,...);
553 < extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
338 > enum { CLEANUP_TKLINES_TIME = 60 };
339   #endif /* INCLUDED_s_conf_h */

Comparing:
ircd-hybrid-8/include/conf.h (property svn:keywords), Revision 1364 by michael, Sun Apr 22 19:28:21 2012 UTC vs.
ircd-hybrid/trunk/include/conf.h (property svn:keywords), Revision 7793 by michael, Mon Oct 17 19:28:52 2016 UTC

# Line 1 | Line 1
1 < Id Revision
1 > Id

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)