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 1370 by michael, Wed Apr 25 19:16:16 2012 UTC vs.
ircd-hybrid/trunk/include/conf.h (file contents), Revision 9750 by michael, Sun Nov 29 16:51:58 2020 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-2020 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"
32 <
36 <
37 < struct Client;
31 > #include "conf_class.h"
32 > #include "tls.h"
33  
39 extern struct Callback *client_check_cb;
34  
35 < struct conf_parser_context
35 > enum
36   {
37 <  unsigned int boot;
38 <  unsigned int pass;
45 <  FILE *conf_file;
37 >  TK_SECONDS,
38 >  TK_MINUTES
39   };
40  
41 < extern struct conf_parser_context conf_parser_ctx;
41 > enum { CLEANUP_TKLINES_TIME = 60 };
42 >
43 > enum maskitem_type
44 > {
45 >  CONF_CLIENT = 1,
46 >  CONF_SERVER,
47 >  CONF_KLINE,
48 >  CONF_DLINE,
49 >  CONF_EXEMPT,
50 >  CONF_OPER
51 > };
52 >
53 > /* MaskItem->flags */
54 > enum
55 > {
56 >  CONF_FLAGS_NO_TILDE        = 1 <<  0,
57 >  CONF_FLAGS_NEED_IDENTD     = 1 <<  1,
58 >  CONF_FLAGS_EXEMPTKLINE     = 1 <<  2,
59 >  CONF_FLAGS_NOLIMIT         = 1 <<  3,
60 >  CONF_FLAGS_SPOOF_IP        = 1 <<  4,
61 >  CONF_FLAGS_REDIR           = 1 <<  5,
62 >  CONF_FLAGS_CAN_FLOOD       = 1 <<  6,
63 >  CONF_FLAGS_NEED_PASSWORD   = 1 <<  7,
64 >  CONF_FLAGS_ALLOW_AUTO_CONN = 1 <<  8,
65 >  CONF_FLAGS_ENCRYPTED       = 1 <<  9,
66 >  CONF_FLAGS_IN_DATABASE     = 1 << 10,
67 >  CONF_FLAGS_EXEMPTRESV      = 1 << 11,
68 >  CONF_FLAGS_TLS             = 1 << 12,
69 >  CONF_FLAGS_WEBIRC          = 1 << 13,
70 >  CONF_FLAGS_EXEMPTXLINE     = 1 << 14
71 > };
72 >
73 > enum
74 > {
75 >  NOT_AUTHORIZED = -1,
76 >  I_LINE_FULL    = -2,
77 >  TOO_MANY       = -3,
78 >  BANNED_CLIENT  = -4,
79 >  TOO_FAST       = -5
80 > };
81 >
82 > #define CONF_NOREASON "<No reason supplied>"
83 >
84 > /* Macros for struct MaskItem */
85 > #define IsConfWebIRC(x)           ((x)->flags & CONF_FLAGS_WEBIRC)
86 > #define IsNoTilde(x)              ((x)->flags & CONF_FLAGS_NO_TILDE)
87 > #define IsConfCanFlood(x)         ((x)->flags & CONF_FLAGS_CAN_FLOOD)
88 > #define IsNeedPassword(x)         ((x)->flags & CONF_FLAGS_NEED_PASSWORD)
89 > #define IsNeedIdentd(x)           ((x)->flags & CONF_FLAGS_NEED_IDENTD)
90 > #define IsConfExemptKline(x)      ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
91 > #define IsConfExemptXline(x)      ((x)->flags & CONF_FLAGS_EXEMPTXLINE)
92 > #define IsConfExemptLimits(x)     ((x)->flags & CONF_FLAGS_NOLIMIT)
93 > #define IsConfExemptResv(x)       ((x)->flags & CONF_FLAGS_EXEMPTRESV)
94 > #define IsConfDoSpoofIp(x)        ((x)->flags & CONF_FLAGS_SPOOF_IP)
95 > #define IsConfAllowAutoConn(x)    ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
96 > #define SetConfAllowAutoConn(x)   ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
97 > #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
98 > #define IsConfRedir(x)            ((x)->flags & CONF_FLAGS_REDIR)
99 > #define IsConfTLS(x)              ((x)->flags & CONF_FLAGS_TLS)
100 > #define IsConfDatabase(x)         ((x)->flags & CONF_FLAGS_IN_DATABASE)
101 > #define SetConfDatabase(x)        ((x)->flags |= CONF_FLAGS_IN_DATABASE)
102 >
103  
104 < typedef enum
105 < {  
52 <  CONF_TYPE,
53 <  CLASS_TYPE,
54 <  OPER_TYPE,
55 <  CLIENT_TYPE,
56 <  SERVER_TYPE,
57 <  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;
104 > #define IsConfKill(x)           ((x)->type == CONF_KLINE)
105 > #define IsConfClient(x)         ((x)->type == CONF_CLIENT)
106  
107   struct split_nuh_item
108   {
# Line 85 | Line 118 | struct split_nuh_item
118    size_t hostsize;
119   };
120  
121 < 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
102 < {
103 <  char *user;           /* Used for ULINE only */
104 <  char *host;           /* Used for ULINE only */
105 <  char *reason;
106 <  char *oper_reason;
107 <  int action;           /* used for uline */
108 <  int count;            /* How many times this matchitem has been matched */
109 <  int ref_count;        /* How many times is this matchitem in use */
110 <  int illegal;          /* Should it be deleted when possible? */
111 <  time_t           hold;     /* Hold action until this time (calendar time) */
112 < };
113 <
114 < struct AccessItem
121 > struct MaskItem
122   {
123 <  dlink_node node;
124 <  unsigned int     dns_failed;
125 <  unsigned int     dns_pending;
126 <  unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
127 <  unsigned int     flags;
128 <  unsigned int     modes;
129 <  unsigned int     port;
130 <  int              clients;  /* Number of *LOCAL* clients using this */
131 <  int              bits;
132 <  int              type;
133 <  struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
134 <  struct irc_ssaddr ipnum;      /* ip to connect to */
135 <  char *           host;     /* host part of user@host */
136 <  char *           passwd;
137 <  char *           spasswd;  /* Password to send. */
138 <  char *           reason;
139 <  char *           oper_reason;
140 <  char *           user;     /* user part of user@host */
141 <  time_t           hold;     /* Hold action until this time (calendar time) */
142 <  struct ConfItem *class_ptr;  /* Class of connection */
143 <  int              aftype;
144 < #ifdef HAVE_LIBCRYPTO
145 <  /* certs */
146 <  char *cipher_list;
147 <  char *           rsa_public_key_file;
148 <  RSA *            rsa_public_key;
149 < #endif
150 <  void *regexuser;
151 <  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;
123 >  dlink_node         node;
124 >  dlink_list         leaf_list;
125 >  dlink_list         hub_list;
126 >  enum maskitem_type type;
127 >  bool       active;
128 >  bool       dns_failed;
129 >  bool       dns_pending;
130 >  unsigned int       flags;
131 >  unsigned int       modes;
132 >  unsigned int       port;
133 >  unsigned int       aftype;
134 >  unsigned int       htype;
135 >  unsigned int       ref_count;  /* Number of *LOCAL* clients using this */
136 >  int                bits;
137 >  uintmax_t          until;     /* Hold action until this time (calendar time) */
138 >  uintmax_t          setat;
139 >  uintmax_t          timeout;
140 >  struct irc_ssaddr  *bind;  /* ip to bind to for outgoing connect */
141 >  struct irc_ssaddr  *addr;  /* ip to connect to */
142 >  struct ClassItem  *class;  /* Class of connection */
143 >  char              *name;
144 >  char              *user;     /* user part of user@host */
145 >  char              *host;     /* host part of user@host */
146 >  char              *passwd;
147 >  char              *spasswd;  /* Password to send. */
148 >  char              *reason;
149 >  char              *certfp;
150 >  char              *whois;
151 >  char              *cipher_list;
152   };
153  
154 < struct CidrItem
154 > struct conf_parser_context
155   {
156 <  dlink_node node;
157 <  struct irc_ssaddr mask;
158 <  int number_on_this_cidr;
156 >  unsigned int boot;
157 >  unsigned int pass;
158 >  FILE *conf_file;
159   };
160  
161 < #define ConFreq(x)      ((x)->con_freq)
175 < #define PingFreq(x)     ((x)->ping_freq)
176 < #define PingWarning(x)  ((x)->ping_warning)
177 < #define MaxTotal(x)     ((x)->max_total)
178 < #define MaxGlobal(x)    ((x)->max_global)
179 < #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_KLINE              0x00000010
197 < #define CONF_CLASS              0x00000020
198 < #define CONF_LEAF               0x00000040
199 < #define CONF_LISTEN_PORT        0x00000080
200 < #define CONF_HUB                0x00000100
201 < #define CONF_EXEMPTKLINE        0x00000200
202 < #define CONF_NOLIMIT            0x00000400
203 < #define CONF_DLINE              0x00000800
204 < #define CONF_XLINE              0x00001000
205 < #define CONF_ULINE              0x00002000
206 < #define CONF_EXEMPTDLINE        0x00004000
207 < #define CONF_GLINE              0x00008000
208 < #define CONF_SERVICE            0x00010000
209 <
210 < #define CONF_SERVER_MASK       CONF_SERVER
211 < #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
212 <
213 < /* XXX temporary hack */
214 < #define CONF_CRESV              0x80000001
215 < #define CONF_NRESV              0x80000002
216 <
217 < #define IsConfIllegal(x)        ((x)->status & CONF_ILLEGAL)
218 < #define SetConfIllegal(x)       ((x)->status |= CONF_ILLEGAL)
219 < #define IsConfServer(x)         ((x)->status == CONF_SERVER)
220 < #define SetConfServer(x)        ((x)->status = CONF_SERVER)
221 < #define IsConfOperator(x)       ((x)->status & CONF_OPERATOR)
222 < #define IsConfHub(x)            ((x)->status == CONF_HUB)
223 < #define SetConfHub(x)           ((x)->status = CONF_HUB)
224 < #define IsConfLeaf(x)           ((x)->status == CONF_LEAF)
225 < #define SetConfLeaf(x)          ((x)->status = CONF_LEAF)
226 < #define IsConfHubOrLeaf(x)      ((x)->status & (CONF_HUB|CONF_LEAF))
227 < #define IsConfKill(x)           ((x)->status == CONF_KLINE)
228 < #define IsConfClient(x)         ((x)->status & CONF_CLIENT)
229 < #define IsConfTypeOfClient(x)   ((x)->status & CONF_CLIENT_MASK)
230 < #define IsConfUline(x)          ((x)->status & CONF_ULINE)
231 < #define IsConfXline(x)          ((x)->status & CONF_XLINE)
232 < #define IsConfGline(x)          ((x)->status == CONF_GLINE)
233 <
234 < /* AccessItem->flags */
235 <
236 < /* Generic flags... */
237 < /* access flags... */
238 < #define CONF_FLAGS_DO_IDENTD            0x00000001
239 < #define CONF_FLAGS_LIMIT_IP             0x00000002
240 < #define CONF_FLAGS_NO_TILDE             0x00000004
241 < #define CONF_FLAGS_NEED_IDENTD          0x00000008
242 < #define CONF_FLAGS_NOMATCH_IP           0x00000010
243 < #define CONF_FLAGS_EXEMPTKLINE          0x00000020
244 < #define CONF_FLAGS_NOLIMIT              0x00000040
245 < #define CONF_FLAGS_SPOOF_IP             0x00000080
246 < #define CONF_FLAGS_SPOOF_NOTICE         0x00000100
247 < #define CONF_FLAGS_REDIR                0x00000200
248 < #define CONF_FLAGS_EXEMPTGLINE          0x00000400
249 < #define CONF_FLAGS_CAN_FLOOD            0x00000800
250 < #define CONF_FLAGS_NEED_PASSWORD        0x00001000
251 < /* server flags */
252 < #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00002000
253 < #define CONF_FLAGS_ENCRYPTED            0x00004000
254 < #define CONF_FLAGS_TEMPORARY            0x00008000
255 < #define CONF_FLAGS_BURST_AWAY           0x00010000
256 < #define CONF_FLAGS_EXEMPTRESV           0x00020000
257 < #define CONF_FLAGS_TOPICBURST           0x00040000
258 < #define CONF_FLAGS_SSL                  0x00080000
259 <
260 < /* Macros for struct AccessItem */
261 < #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
262 < #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
263 < #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
264 < #define IsNeedPassword(x)       ((x)->flags & CONF_FLAGS_NEED_PASSWORD)
265 < #define IsNeedIdentd(x)         ((x)->flags & CONF_FLAGS_NEED_IDENTD)
266 < #define IsNoMatchIp(x)          ((x)->flags & CONF_FLAGS_NOMATCH_IP)
267 < #define IsConfExemptKline(x)    ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
268 < #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
269 < #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
270 < #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
271 < #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
272 < #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
273 < #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
274 < #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
275 < #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
276 < #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
277 < #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
278 < #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
279 < #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
280 < #define IsConfTemporary(x)      ((x)->flags & CONF_FLAGS_TEMPORARY)
281 < #define SetConfTemporary(x)     ((x)->flags |= CONF_FLAGS_TEMPORARY)
282 < #define IsConfRedir(x)          ((x)->flags & CONF_FLAGS_REDIR)
283 < #define IsConfAwayBurst(x)      ((x)->flags & CONF_FLAGS_BURST_AWAY)
284 < #define SetConfAwayBurst(x)     ((x)->flags |= CONF_FLAGS_BURST_AWAY)
285 < #define ClearConfAwayBurst(x)   ((x)->flags &= ~CONF_FLAGS_BURST_AWAY)
286 < #define IsConfTopicBurst(x)     ((x)->flags & CONF_FLAGS_TOPICBURST)
287 < #define SetConfTopicBurst(x)    ((x)->flags |= CONF_FLAGS_TOPICBURST)
288 < #define ClearConfTopicBurst(x)  ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
289 < #define IsConfSSL(x)      ((x)->flags & CONF_FLAGS_SSL)
290 < #define SetConfSSL(x)     ((x)->flags |= CONF_FLAGS_SSL)
291 < #define ClearConfSSL(x)   ((x)->flags &= ~CONF_FLAGS_SSL)
292 <
293 < /* shared/cluster server entry types
294 < * These defines are used for both shared and cluster.
295 < */
296 < #define SHARED_KLINE            0x0001
297 < #define SHARED_UNKLINE          0x0002
298 < #define SHARED_XLINE            0x0004
299 < #define SHARED_UNXLINE          0x0008
300 < #define SHARED_RESV             0x0010
301 < #define SHARED_UNRESV           0x0020
302 < #define SHARED_LOCOPS           0x0040
303 < #define SHARED_DLINE            0x0080
304 < #define SHARED_UNDLINE          0x0100
305 < #define SHARED_ALL              (SHARED_KLINE | SHARED_UNKLINE |\
306 <                                 SHARED_XLINE | SHARED_UNXLINE |\
307 <                                 SHARED_RESV | SHARED_UNRESV |\
308 <                                 SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
309 <
310 < /* gline acl entry actions */
311 < #define GDENY_BLOCK             0x1
312 < #define GDENY_REJECT            0x2
313 <
314 < 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;
320  const char *rxlinefile;
321  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 <
332 <  MessageFile motd;
333 <  MessageFile opermotd;
334 <  MessageFile linksfile;
335 <
336 <  int gline_min_cidr;
337 <  int gline_min_cidr6;
338 <  int dots_in_ident;
339 <  int failed_oper_notice;
340 <  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;
180 >  unsigned int max_monitor;
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;
376 <  int min_nonwildcard;
377 <  int min_nonwildcard_simple;
378 <  int kill_chase_time_limit;
379 <  int default_floodcount;
380 <  int client_flood;
381 <  /* 0 == don't use throttle... */
382 <  int throttle_time;
383 <  int use_egd;
384 <  int ping_cookie;
385 <  int disable_auth;
386 <  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 opers_bypass_callerid;
201 >  unsigned int pace_wait;
202 >  unsigned int pace_wait_simple;
203 >  unsigned int oper_only_umodes;
204 >  unsigned int oper_umodes;
205 >  unsigned int max_targets;
206 >  unsigned int caller_id_wait;
207 >  unsigned int min_nonwildcard;
208 >  unsigned int min_nonwildcard_simple;
209 >  unsigned int kill_chase_time_limit;
210 >  unsigned int default_floodcount;
211 >  unsigned int default_floodtime;
212 >  unsigned int throttle_count;
213 >  unsigned int throttle_time;
214 >  unsigned int ping_cookie;
215 >  unsigned int disable_auth;
216 >  unsigned int cycle_on_host_change;
217   };
218  
219   struct config_channel_entry
220   {
221 <  int disable_fake_channels;
222 <  int restrict_channels;
223 <  int disable_local_channels;
224 <  int use_except;
225 <  int use_invex;
226 <  int use_knock;
227 <  int knock_delay;
228 <  int knock_delay_channel;
221 >  unsigned int enable_extbans;
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;
235 <  int quiet_on_ban;
404 <  int burst_topicwho;
405 <  int default_split_server_count;
406 <  int default_split_user_count;
232 >  unsigned int max_bans_large;
233 >  unsigned int max_channels;
234 >  unsigned int default_join_flood_count;
235 >  unsigned int default_join_flood_time;
236   };
237  
238 < struct config_server_hide
238 > struct config_serverhide_entry
239   {
240    char *hidden_name;
241 <  int flatten_links;
242 <  int hide_servers;
243 <  int links_delay;
244 <  int links_disabled;
245 <  int hidden;
246 <  int disable_hidden;
247 <  int hide_server_ips;
241 >  char *flatten_links_file;
242 >  unsigned int flatten_links;
243 >  unsigned int flatten_links_delay;
244 >  unsigned int disable_remote_commands;
245 >  unsigned int hide_servers;
246 >  unsigned int hide_services;
247 >  unsigned int hidden;
248 >  unsigned int hide_server_ips;
249   };
250  
251 < struct server_info
251 > struct config_serverinfo_entry
252   {
253    char *sid;
254    char *name;
255    char *description;
256    char *network_name;
257 <  char *network_desc;
428 < #ifdef HAVE_LIBCRYPTO
257 >  char *network_description;
258    char *rsa_private_key_file;
259 <  RSA *rsa_private_key;
260 <  SSL_CTX *server_ctx;
261 <  SSL_CTX *client_ctx;
262 < #endif
263 <  int hub;
264 <  struct irc_ssaddr ip;
265 <  struct irc_ssaddr ip6;
266 <  unsigned int max_clients;
267 <  int specific_ipv4_vhost;
268 <  int specific_ipv6_vhost;
269 <  struct sockaddr_in dns_host;
270 <  int can_use_v6;
259 >  char *tls_certificate_file;
260 >  char *tls_dh_param_file;
261 >  char *tls_supported_groups;
262 >  char *tls_cipher_list;
263 >  char *tls_cipher_suites;
264 >  char *tls_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   };
272  
273 < struct admin_info
273 > struct config_admin_entry
274   {
275    char *name;
276    char *description;
277    char *email;
278   };
279  
280 < struct logging_entry
280 > struct config_log_entry
281   {
282    unsigned int use_logging;
283   };
284  
285 < extern dlink_list gdeny_items;
286 < extern dlink_list class_items;
287 < extern dlink_list server_items;
288 < extern dlink_list cluster_items;
289 < extern dlink_list hub_items;
290 < extern dlink_list rxconf_items;
291 < extern dlink_list rkconf_items;
292 < extern dlink_list leaf_items;
293 < extern dlink_list service_items;
294 < extern dlink_list temporary_xlines;
295 < extern struct logging_entry ConfigLoggingEntry;
296 < extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
297 < extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
298 < extern struct config_server_hide ConfigServerHide; /* defined in s_conf.c */
299 < extern struct server_info ServerInfo;       /* defined in ircd.c */
300 < extern struct admin_info AdminInfo;        /* defined in ircd.c */
301 < extern int valid_wild_card(struct Client *, int, int, ...);
302 < /* End GLOBAL section */
303 <
304 < extern unsigned int get_sendq(struct Client *);
305 < extern const char *get_client_class(struct Client *);
306 < extern int get_client_ping(struct Client *, int *);
307 < extern void check_class(void);
308 < extern void init_class(void);
309 < extern struct ConfItem *find_class(const char *);
310 < extern void init_ip_hash_table(void);
311 < extern void count_ip_hash(unsigned int *, uint64_t *);
312 < extern void remove_one_ip(struct irc_ssaddr *);
313 < extern struct ConfItem *make_conf_item(ConfType type);
314 < extern void free_access_item(struct AccessItem *);
315 < extern void read_conf_files(int);
316 < extern int attach_conf(struct Client *, struct ConfItem *);
317 < extern int attach_connect_block(struct Client *, const char *, const char *);
318 <
319 < extern int detach_conf(struct Client *, ConfType);
491 <
492 < extern struct ConfItem *find_conf_name(dlink_list *, const char *, ConfType);
493 < extern struct ConfItem *find_conf_exact(ConfType, const char *, const char *, const char *);
494 < extern struct AccessItem *find_kill(struct Client *);
495 < extern struct AccessItem *find_gline(struct Client *);
496 < extern int conf_connect_allowed(struct irc_ssaddr *, int);
497 < extern char *oper_privs_as_string(const unsigned int);
285 > struct aline_ctx
286 > {
287 >  bool add;
288 >  bool simple_mask;
289 >  char *mask;
290 >  char *user;
291 >  char *host;
292 >  char *reason;
293 >  char *server;
294 >  uintmax_t duration;
295 > };
296 >
297 > extern dlink_list flatten_links;
298 > extern dlink_list connect_items;
299 > extern dlink_list operator_items;
300 > extern struct conf_parser_context conf_parser_ctx;
301 > extern struct config_log_entry ConfigLog;
302 > extern struct config_general_entry ConfigGeneral;
303 > extern struct config_channel_entry ConfigChannel;
304 > extern struct config_serverhide_entry ConfigServerHide;
305 > extern struct config_serverinfo_entry ConfigServerInfo;
306 > extern struct config_admin_entry ConfigAdminInfo;
307 >
308 > extern bool valid_wild_card_simple(const char *);
309 > extern bool valid_wild_card(int, ...);
310 >
311 > extern struct MaskItem *conf_make(enum maskitem_type);
312 > extern void conf_read_files(bool);
313 > extern int conf_attach(struct Client *, struct MaskItem *);
314 > extern bool conf_check_client(struct Client *);
315 >
316 >
317 > extern void conf_detach(struct Client *, enum maskitem_type);
318 > extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
319 > extern int conf_connect_allowed(struct irc_ssaddr *);
320   extern void split_nuh(struct split_nuh_item *);
321 < extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
322 <                                                const char *, const char *, int);
323 < extern struct ConfItem *find_exact_name_conf(ConfType, const struct Client *, const char *,
502 <                                             const char *, const char *);
503 < extern void delete_conf_item(struct ConfItem *);
504 < extern void report_confitem_types(struct Client *, ConfType);
321 > extern struct MaskItem *operator_find(const struct Client *, const char *);
322 > extern struct MaskItem *connect_find(const char *, int (*)(const char *, const char *));
323 > extern void conf_free(struct MaskItem *);
324   extern void yyerror(const char *);
325 < extern void write_conf_line(struct Client *, struct ConfItem *,
507 <                            const char *, time_t);
508 < extern int remove_conf_line(ConfType, struct Client *, const char *,
509 <                            const char *);
510 < extern void add_temp_line(struct ConfItem *);
325 > extern void conf_error_report(const char *);
326   extern void cleanup_tklines(void *);
327 < extern const char *get_conf_name(ConfType);
328 < extern int rehash(int);
329 < extern int conf_add_server(struct ConfItem *, const char *);
330 < extern void conf_add_class_to_conf(struct ConfItem *, const char *);
516 <
517 < /* XXX consider moving these into csvlib.h */
518 < extern void parse_csv_file(FILE *, ConfType);
519 < extern int find_and_delete_temporary(const char *, const char *, int);
327 > extern void conf_rehash(bool);
328 > extern void conf_dns_lookup(struct MaskItem *);
329 > extern void conf_add_class_to_conf(struct MaskItem *, const char *);
330 >
331   extern const char *get_oper_name(const struct Client *);
332  
522 extern void *map_to_conf(struct ConfItem *);
523 extern struct ConfItem *unmap_conf_item(void *);
333   /* XXX should the parse_aline stuff go into another file ?? */
334 < #define AWILD 0x1               /* check wild cards */
335 < #define NOUSERLOOKUP 0x2 /* Don't lookup the user@host on /rkline nick */
336 < extern int parse_aline(const char *, struct Client *, int, char **,
337 <                       int, char **, char **, time_t *, char **, char **);
338 < extern int valid_comment(struct Client *, char *, int);
530 <
531 <
532 < #define TK_SECONDS 0
533 < #define TK_MINUTES 1
534 < extern time_t valid_tkline(const char *, int);
535 < extern int match_conf_password(const char *, const struct AccessItem *);
536 <
537 < #define NOT_AUTHORIZED    (-1)
538 < #define I_LINE_FULL       (-2)
539 < #define TOO_MANY          (-3)
540 < #define BANNED_CLIENT     (-4)
541 < #define TOO_FAST          (-5)
542 <
543 < #define CLEANUP_TKLINES_TIME 60
544 <
545 < extern void cluster_a_line(struct Client *,
546 <                           const char *, int, int, const char *,...);
547 < extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
548 < #endif /* INCLUDED_s_conf_h */
334 > extern bool parse_aline(const char *, struct Client *, int, char **, struct aline_ctx *);
335 >
336 > extern uintmax_t valid_tkline(const char *, const int);
337 > extern bool match_conf_password(const char *, const struct MaskItem *);
338 > #endif  /* INCLUDED_conf_h */

Comparing:
ircd-hybrid-8/include/conf.h (property svn:keywords), Revision 1370 by michael, Wed Apr 25 19:16:16 2012 UTC vs.
ircd-hybrid/trunk/include/conf.h (property svn:keywords), Revision 9750 by michael, Sun Nov 29 16:51:58 2020 UTC

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

Diff Legend

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