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-7.2/include/s_conf.h (file contents), Revision 56 by michael, Mon Oct 3 11:33:30 2005 UTC vs.
ircd-hybrid/trunk/include/conf.h (file contents), Revision 1644 by michael, Tue Nov 6 22:20:16 2012 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  s_conf.h: A header for the configuration functions.
3 > *  conf.h: A header for the configuration functions.
4   *
5   *  Copyright (C) 2005 by the past and present ircd coders, and others.
6   *
# Line 24 | Line 24
24  
25   #ifndef INCLUDED_s_conf_h
26   #define INCLUDED_s_conf_h
27 < #include "setup.h"
28 < #ifdef HAVE_LIBCRYPTO
29 < #include <openssl/rsa.h>
30 < #endif
31 < #include "fileio.h"             /* FBFILE */
27 > #include "config.h"
28   #include "ircd_defs.h"
29   #include "motd.h"               /* MessageFile */
30   #include "client.h"
31   #include "hook.h"
32 < #include "pcre.h"
32 > #include "conf_class.h"
33  
34 < struct Client;
35 < struct DNSReply;
36 < struct hostent;
37 <
38 < extern FBFILE *conf_fbfile_in;
39 < extern struct Callback *client_check_cb;
40 <
45 < typedef enum
46 < {  
47 <  CONF_TYPE,
48 <  CLASS_TYPE,
49 <  OPER_TYPE,
50 <  CLIENT_TYPE,
51 <  SERVER_TYPE,
52 <  HUB_TYPE,
53 <  LEAF_TYPE,
54 <  KLINE_TYPE,
55 <  DLINE_TYPE,
56 <  EXEMPTDLINE_TYPE,
57 <  CLUSTER_TYPE,
58 <  RKLINE_TYPE,
59 <  RXLINE_TYPE,
60 <  XLINE_TYPE,    
61 <  ULINE_TYPE,
62 <  GLINE_TYPE,
63 <  CRESV_TYPE,    
64 <  NRESV_TYPE,
65 <  GDENY_TYPE
66 < } ConfType;
67 <
68 < struct ConfItem
69 < {
70 <  char *name;           /* Primary key */
71 <  pcre *regexpname;
72 <  dlink_node node;      /* link into known ConfItems of this type */
73 <  unsigned int flags;
74 <  ConfType type;
34 >
35 >
36 > struct conf_parser_context
37 > {
38 >  unsigned int boot;
39 >  unsigned int pass;
40 >  FILE *conf_file;
41   };
42  
43 < /*
44 < * MatchItem - used for XLINE and ULINE types
45 < */
80 < struct MatchItem
43 > extern struct conf_parser_context conf_parser_ctx;
44 >
45 > enum maskitem_type
46   {
47 <  char *user;           /* Used for ULINE only */
48 <  char *host;           /* Used for ULINE only */
49 <  char *reason;
50 <  char *oper_reason;
51 <  int action;           /* used for uline */
52 <  int count;            /* How many times this matchitem has been matched */
53 <  int ref_count;        /* How many times is this matchitem in use */
54 <  int illegal;          /* Should it be deleted when possible? */
55 <  time_t           hold;     /* Hold action until this time (calendar time) */
47 >  CONF_RESERVED = 1 <<  0, /* XXX */
48 >  CONF_CLIENT   = 1 <<  1,
49 >  CONF_SERVER   = 1 <<  2,
50 >  CONF_KLINE    = 1 <<  3,
51 >  CONF_DLINE    = 1 <<  4,
52 >  CONF_EXEMPT   = 1 <<  5,
53 >  CONF_CLUSTER  = 1 <<  6,
54 >  CONF_RKLINE   = 1 <<  7,
55 >  CONF_RXLINE   = 1 <<  8,
56 >  CONF_XLINE    = 1 <<  9,
57 >  CONF_ULINE    = 1 << 10,
58 >  CONF_GLINE    = 1 << 11,
59 >  CONF_CRESV    = 1 << 12,
60 >  CONF_NRESV    = 1 << 13,
61 >  CONF_SERVICE  = 1 << 14,
62 >  CONF_OPER     = 1 << 15,
63 >  CONF_HUB      = 1 << 16, /* XXX There are no separate hub/leaf configs anymore. This is just for /stats h */
64 >  CONF_CLASS    = 1 << 17  /* XXX Same here; just for /stats Y|y */
65   };
66  
67 < struct AccessItem
67 > struct split_nuh_item
68   {
69    dlink_node node;
70 <  unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
71 <  unsigned int     flags;
72 <  unsigned int     modes;
73 <  int              clients;  /* Number of *LOCAL* clients using this */
74 <  struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
75 <  struct irc_ssaddr ipnum;      /* ip to connect to */
76 <  char *           host;     /* host part of user@host */
77 <  char *           passwd;
78 <  char *           spasswd;  /* Password to send. */
79 <  char *           reason;
80 <  char *           oper_reason;
81 <  char *           user;     /* user part of user@host */
82 <  int              port;
83 <  char *           fakename;   /* Mask name */
84 <  time_t           hold;     /* Hold action until this time (calendar time) */
85 <  struct ConfItem *class_ptr;  /* Class of connection */
86 <  struct DNSQuery* dns_query;
87 <  int              aftype;
88 < #ifdef HAVE_LIBCRYPTO
89 <  char *           rsa_public_key_file;
90 <  RSA *            rsa_public_key;
91 <  struct EncCapability *cipher_preference;
92 < #endif
93 <  pcre *regexuser;
94 <  pcre *regexhost;
95 < };
96 <
97 < struct ClassItem
98 < {
99 <  long max_sendq;
100 <  int con_freq;
101 <  int ping_freq;
102 <  int ping_warning;
103 <  int max_total;
104 <  int max_local;
105 <  int max_global;
106 <  int max_ident;
107 <  int max_perip;
108 <  int curr_user_count;
109 <  int cidr_bitlen_ipv4;
110 <  int cidr_bitlen_ipv6;
111 <  int number_per_cidr;
112 <  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
113 <  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
70 >
71 >  char *nuhmask;
72 >  char *nickptr;
73 >  char *userptr;
74 >  char *hostptr;
75 >
76 >  size_t nicksize;
77 >  size_t usersize;
78 >  size_t hostsize;
79 > };
80 >
81 > struct MaskItem
82 > {
83 >  struct MaskItem   *hnext;
84 >  dlink_node         node;
85 >  dlink_list         leaf_list;
86 >  dlink_list         hub_list;
87 >  enum maskitem_type type;
88 >  unsigned int       dns_failed;
89 >  unsigned int       dns_pending;
90 >  unsigned int       flags;
91 >  unsigned int       modes;
92 >  unsigned int       port;
93 >  unsigned int       count;
94 >  unsigned int       aftype;
95 >  unsigned int       active;
96 >  unsigned int       htype;
97 >  unsigned int       ref_count;  /* Number of *LOCAL* clients using this */
98 >  int                bits;
99 >  time_t             hold;     /* Hold action until this time (calendar time) */
100 >  time_t             setat;
101 >  struct irc_ssaddr  bind;  /* ip to bind to for outgoing connect */
102 >  struct irc_ssaddr  addr;  /* ip to connect to */
103 >  struct ClassItem  *class;  /* Class of connection */
104 >  char              *name;
105 >  char              *host;     /* host part of user@host */
106 >  char              *passwd;
107 >  char              *spasswd;  /* Password to send. */
108 >  char              *reason;
109 >  char              *user;     /* user part of user@host */
110 >  char              *cipher_list;
111 >  char              *rsa_public_key_file;
112 >  void              *rsa_public_key;
113 >  void              *regexuser;
114 >  void              *regexhost;
115   };
116  
117   struct CidrItem
118   {
144 –  struct irc_ssaddr mask;
145 –  int number_on_this_cidr;
119    dlink_node node;
120 +  struct irc_ssaddr mask;
121 +  unsigned int number_on_this_cidr;
122   };
123  
149 – #define ConFreq(x)      ((x)->con_freq)
150 – #define PingFreq(x)     ((x)->ping_freq)
151 – #define PingWarning(x)  ((x)->ping_warning)
152 – #define MaxTotal(x)     ((x)->max_total)
153 – #define MaxGlobal(x)    ((x)->max_global)
154 – #define MaxLocal(x)     ((x)->max_local)
155 – #define MaxIdent(x)     ((x)->max_ident)
156 – #define MaxPerIp(x)     ((x)->max_perip)
157 – #define MaxSendq(x)     ((x)->max_sendq)
158 – #define CurrUserCount(x) ((x)->curr_user_count)
159 – #define CidrBitlenIPV4(x)       ((x)->cidr_bitlen_ipv4)
160 – #define CidrBitlenIPV6(x)       ((x)->cidr_bitlen_ipv6)
161 – #define NumberPerCidr(x) ((x)->number_per_cidr)
162 –
163 – #define ClassPtr(x)      ((x)->class_ptr)
164 –
165 –
166 – #define CONF_ILLEGAL            0x80000000
167 – #define CONF_RESERVED           0x00000001
168 – #define CONF_CLIENT             0x00000002
169 – #define CONF_SERVER             0x00000004
170 – #define CONF_OPERATOR           0x00000008
171 – #define CONF_KILL               0x00000010
172 – #define CONF_KLINE              CONF_KILL
173 – #define CONF_CLASS              0x00000020
174 – #define CONF_LEAF               0x00000040
175 – #define CONF_LISTEN_PORT        0x00000080
176 – #define CONF_HUB                0x00000100
177 – #define CONF_EXEMPTKLINE        0x00000200
178 – #define CONF_NOLIMIT            0x00000400
179 – #define CONF_DLINE              0x00000800
180 – #define CONF_XLINE              0x00001000
181 – #define CONF_ULINE              0x00002000
182 – #define CONF_EXEMPTDLINE        0x00004000
183 – #define CONF_GLINE              0x00008000
184 –
185 – #define CONF_SERVER_MASK       CONF_SERVER
186 – #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
187 –
188 – /* XXX temporary hack */
189 – #define CONF_CRESV              0x80000001
190 – #define CONF_NRESV              0x80000002
191 –
192 – #define IsConfIllegal(x)        ((x)->status & CONF_ILLEGAL)
193 – #define SetConfIllegal(x)       ((x)->status |= CONF_ILLEGAL)
194 – #define IsConfServer(x)         ((x)->status == CONF_SERVER)
195 – #define SetConfServer(x)        ((x)->status = CONF_SERVER)
196 – #define IsConfOperator(x)       ((x)->status & CONF_OPERATOR)
197 – #define IsConfHub(x)            ((x)->status == CONF_HUB)
198 – #define SetConfHub(x)           ((x)->status = CONF_HUB)
199 – #define IsConfLeaf(x)           ((x)->status == CONF_LEAF)
200 – #define SetConfLeaf(x)          ((x)->status = CONF_LEAF)
201 – #define IsConfHubOrLeaf(x)      ((x)->status & (CONF_HUB|CONF_LEAF))
202 – #define IsConfKill(x)           ((x)->status == CONF_KILL)
203 – #define IsConfClient(x)         ((x)->status & CONF_CLIENT)
204 – #define IsConfTypeOfClient(x)   ((x)->status & CONF_CLIENT_MASK)
205 – #define IsConfUline(x)          ((x)->status & CONF_ULINE)
206 – #define IsConfXline(x)          ((x)->status & CONF_XLINE)
207 – #define IsConfGline(x)          ((x)->status == CONF_GLINE)
124  
125 < /* AccessItem->flags */
125 > #define IsConfOperator(x)       ((x)->type == CONF_OPER)
126 > #define IsConfKill(x)           ((x)->type == CONF_KLINE)
127 > #define IsConfClient(x)         ((x)->type == CONF_CLIENT)
128 > #define IsConfGline(x)          ((x)->type == CONF_GLINE)
129  
130 < /* Generic flags... */
212 < /* access flags... */
130 > /* MaskItem->flags */
131   #define CONF_FLAGS_DO_IDENTD            0x00000001
132   #define CONF_FLAGS_LIMIT_IP             0x00000002
133   #define CONF_FLAGS_NO_TILDE             0x00000004
134   #define CONF_FLAGS_NEED_IDENTD          0x00000008
135 < /*                                      0x00000010 */
136 < #define CONF_FLAGS_NOMATCH_IP           0x00000020
137 < #define CONF_FLAGS_EXEMPTKLINE          0x00000040
138 < #define CONF_FLAGS_NOLIMIT              0x00000080
139 < #define CONF_FLAGS_IDLE_LINED           0x00000100
140 < #define CONF_FLAGS_SPOOF_IP             0x00000200
141 < #define CONF_FLAGS_SPOOF_NOTICE         0x00000400
142 < #define CONF_FLAGS_REDIR                0x00000800
143 < #define CONF_FLAGS_EXEMPTGLINE          0x00001000
144 < #define CONF_FLAGS_RESTRICTED           0x00002000
145 < #define CONF_FLAGS_CAN_FLOOD            0x00100000
146 < #define CONF_FLAGS_NEED_PASSWORD        0x00200000
147 < /* server flags */
148 < #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00004000
149 < #define CONF_FLAGS_LAZY_LINK            0x00008000
232 < #define CONF_FLAGS_ENCRYPTED            0x00010000
233 < #define CONF_FLAGS_COMPRESSED           0x00020000
234 < #define CONF_FLAGS_TEMPORARY            0x00040000
235 < #define CONF_FLAGS_CRYPTLINK            0x00080000
236 < #define CONF_FLAGS_BURST_AWAY           0x00400000
237 < #define CONF_FLAGS_EXEMPTRESV           0x00800000
238 < #define CONF_FLAGS_TOPICBURST           0x01000000
135 > #define CONF_FLAGS_NOMATCH_IP           0x00000010
136 > #define CONF_FLAGS_EXEMPTKLINE          0x00000020
137 > #define CONF_FLAGS_NOLIMIT              0x00000040
138 > #define CONF_FLAGS_SPOOF_IP             0x00000080
139 > #define CONF_FLAGS_SPOOF_NOTICE         0x00000100
140 > #define CONF_FLAGS_REDIR                0x00000200
141 > #define CONF_FLAGS_EXEMPTGLINE          0x00000400
142 > #define CONF_FLAGS_CAN_FLOOD            0x00000800
143 > #define CONF_FLAGS_NEED_PASSWORD        0x00001000
144 > #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00002000
145 > #define CONF_FLAGS_ENCRYPTED            0x00004000
146 > #define CONF_FLAGS_IN_DATABASE          0x00008000
147 > #define CONF_FLAGS_EXEMPTRESV           0x00010000
148 > #define CONF_FLAGS_SSL                  0x00020000
149 > #define CONF_FLAGS_MAINCONF             0x00040000
150  
151 < /* Macros for struct AccessItem */
151 > /* Macros for struct MaskItem */
152   #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
153   #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
154   #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
# Line 248 | Line 159 | struct CidrItem
159   #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
160   #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
161   #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
251 – #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
162   #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
163   #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
164   #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
255 – #define IsConfRestricted(x)     ((x)->flags & CONF_FLAGS_RESTRICTED)
165   #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
166   #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
167   #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
259 – #define IsConfCompressed(x)     ((x)->flags & CONF_FLAGS_COMPRESSED)
260 – #define SetConfCompressed(x)    ((x)->flags |= CONF_FLAGS_COMPRESSED)
261 – #define ClearConfCompressed(x)  ((x)->flags &= ~CONF_FLAGS_COMPRESSED)
262 – #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
263 – #define SetConfCryptLink(x)     ((x)->flags |= CONF_FLAGS_CRYPTLINK)
264 – #define ClearConfCryptLink(x)   ((x)->flags &= ~CONF_FLAGS_CRYPTLINK)
265 – #define IsConfLazyLink(x)       ((x)->flags & CONF_FLAGS_LAZY_LINK)
266 – #define SetConfLazyLink(x)      ((x)->flags = CONF_FLAGS_LAZY_LINK)
267 – #define ClearConfLazyLink(x)    ((x)->flags &= ~CONF_FLAGS_LAZY_LINK)
168   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
169   #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
170   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
271 – #define IsConfTemporary(x)      ((x)->flags & CONF_FLAGS_TEMPORARY)
272 – #define SetConfTemporary(x)     ((x)->flags |= CONF_FLAGS_TEMPORARY)
171   #define IsConfRedir(x)          ((x)->flags & CONF_FLAGS_REDIR)
172 < #define IsConfAwayBurst(x)      ((x)->flags & CONF_FLAGS_BURST_AWAY)
173 < #define SetConfAwayBurst(x)     ((x)->flags |= CONF_FLAGS_BURST_AWAY)
174 < #define ClearConfAwayBurst(x)   ((x)->flags &= ~CONF_FLAGS_BURST_AWAY)
175 < #define IsConfTopicBurst(x)     ((x)->flags & CONF_FLAGS_TOPICBURST)
176 < #define SetConfTopicBurst(x)    ((x)->flags |= CONF_FLAGS_TOPICBURST)
177 < #define ClearConfTopicBurst(x)  ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
172 > #define IsConfSSL(x)      ((x)->flags & CONF_FLAGS_SSL)
173 > #define SetConfSSL(x)     ((x)->flags |= CONF_FLAGS_SSL)
174 > #define ClearConfSSL(x)   ((x)->flags &= ~CONF_FLAGS_SSL)
175 > #define IsConfDatabase(x)      ((x)->flags & CONF_FLAGS_IN_DATABASE)
176 > #define SetConfDatabase(x)     ((x)->flags |= CONF_FLAGS_IN_DATABASE)
177 >
178  
179   /* shared/cluster server entry types
180   * These defines are used for both shared and cluster.
181   */
182   #define SHARED_KLINE            0x0001
183 < #define SHARED_TKLINE           0x0002
184 < #define SHARED_UNKLINE          0x0004
185 < #define SHARED_XLINE            0x0008
186 < #define SHARED_TXLINE           0x0010
187 < #define SHARED_UNXLINE          0x0020
188 < #define SHARED_RESV             0x0040
189 < #define SHARED_TRESV            0x0080
190 < #define SHARED_UNRESV           0x0100
191 < #define SHARED_LOCOPS           0x0200
192 < #define SHARED_ALL              (SHARED_KLINE | SHARED_TKLINE | SHARED_UNKLINE | \
193 <                                 SHARED_XLINE | SHARED_TXLINE | SHARED_UNXLINE | \
194 <                                 SHARED_RESV | SHARED_TRESV | SHARED_UNRESV |\
297 <                                 SHARED_LOCOPS)
298 <
299 < /* gline acl entry actions */
300 < #define GDENY_BLOCK             0x1
301 < #define GDENY_REJECT            0x2
183 > #define SHARED_UNKLINE          0x0002
184 > #define SHARED_XLINE            0x0004
185 > #define SHARED_UNXLINE          0x0008
186 > #define SHARED_RESV             0x0010
187 > #define SHARED_UNRESV           0x0020
188 > #define SHARED_LOCOPS           0x0040
189 > #define SHARED_DLINE            0x0080
190 > #define SHARED_UNDLINE          0x0100
191 > #define SHARED_ALL              (SHARED_KLINE | SHARED_UNKLINE |\
192 >                                 SHARED_XLINE | SHARED_UNXLINE |\
193 >                                 SHARED_RESV | SHARED_UNRESV |\
194 >                                 SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
195  
196   struct config_file_entry
197   {
# Line 306 | Line 199 | struct config_file_entry
199    const char *configfile;
200    const char *klinefile;
201    const char *xlinefile;
309 –  const char *rxlinefile;
310 –  const char *rklinefile;
202    const char *dlinefile;
312 –  const char *glinefile;
203    const char *cresvfile;
204    const char *nresvfile;
205  
316 –  char *logpath;
317 –  char *operlog;
318 –
319 –  char *servlink_path;
206    char *egdpool_path;
207 +  char *service_name;
208  
209    MessageFile motd;
323 –  MessageFile opermotd;
210    MessageFile linksfile;
211  
326 –  unsigned char compression_level;
212    int gline_min_cidr;
213    int gline_min_cidr6;
329 –  int dot_in_ip6_addr;
214    int dots_in_ident;
215    int failed_oper_notice;
216    int anti_spam_exit_message_time;
217 <  int max_accept;
217 >  unsigned int max_accept;
218 >  unsigned int max_watch;
219    int max_nick_time;
220 <  int max_nick_changes;
220 >  unsigned int max_nick_changes;
221    int ts_max_delta;
222    int ts_warn_delta;
223    int anti_nick_flood;
339 –  int kline_with_reason;
224    int warn_no_nline;
225    int invisible_on_connect;
226 +  int stats_e_disabled;
227    int stats_o_oper_only;
228    int stats_k_oper_only;
229    int stats_i_oper_only;
# Line 349 | Line 234 | struct config_file_entry
234    int oper_pass_resv;
235    int glines;
236    int hide_spoof_ips;
352 –  int burst_away;
353 –  int use_whois_actually;
237    int tkline_expire_notices;
238    int opers_bypass_callerid;
239    int ignore_bogus_ts;
357 –  char *kline_reason;
240    int pace_wait;
241    int pace_wait_simple;
242    int gline_time;
243 <  int gline_logging;
362 <  int idletime;
243 >  int gline_request_time;
244    int oper_only_umodes;
245    int oper_umodes;
246    int max_targets;
# Line 368 | Line 249 | struct config_file_entry
249    int min_nonwildcard_simple;
250    int kill_chase_time_limit;
251    int default_floodcount;
371 –  int client_flood;
252    /* 0 == don't use throttle... */
253    int throttle_time;
254    int use_egd;
255    int ping_cookie;
256    int disable_auth;
257    int disable_remote;
378 – #ifdef HAVE_LIBCRYPTO
379 –  struct EncCapability *default_cipher_preference;
380 – #endif
258   };
259  
260   struct config_channel_entry
261   {
262 +  int disable_fake_channels;
263    int restrict_channels;
386 –  int disable_local_channels;
387 –  int use_except;
388 –  int use_invex;
389 –  int use_knock;
264    int knock_delay;
265    int knock_delay_channel;
392 –  int invite_ops_only;
266    unsigned int max_bans;
267    unsigned int max_chans_per_user;
268 +  unsigned int max_chans_per_oper;
269    int no_create_on_split;
270    int no_join_on_split;
271    int quiet_on_ban;
398 –  int burst_topicwho;
272    int default_split_server_count;
273    int default_split_user_count;
274   };
275  
276   struct config_server_hide
277   {
278 +  char *hidden_name;
279    int flatten_links;
280    int hide_servers;
407 –  char *hidden_name;
281    int links_delay;
282    int links_disabled;
283    int hidden;
411 –  int disable_hidden;
284    int hide_server_ips;
285   };
286  
287   struct server_info
288   {
289 +  char *sid;
290    char *name;
291    char *description;
292    char *network_name;
293    char *network_desc;
421 – #ifdef HAVE_LIBCRYPTO
294    char *rsa_private_key_file;
295 <  RSA *rsa_private_key;
296 <  SSL_CTX *ctx;
297 < #endif
426 <  char *sid;
295 >  void *rsa_private_key;
296 >  void *server_ctx;
297 >  void *client_ctx;
298    int hub;
299    struct irc_ssaddr ip;
300    struct irc_ssaddr ip6;
301 <  int max_clients;
301 >  unsigned int max_clients;
302    int specific_ipv4_vhost;
303    int specific_ipv6_vhost;
304    struct sockaddr_in dns_host;
# Line 444 | Line 315 | struct admin_info
315   struct logging_entry
316   {
317    unsigned int use_logging;
447 –  char operlog[PATH_MAX + 1];
448 –  char userlog[PATH_MAX + 1];
449 –  char glinelog[PATH_MAX + 1];
450 –  char ioerrlog[PATH_MAX + 1];
451 –  char klinelog[PATH_MAX + 1];
452 –  char killlog[PATH_MAX + 1];
453 –  char operspylog[PATH_MAX + 1];
454 –  char failed_operlog[PATH_MAX + 1];
318   };
319  
457 – extern unsigned int scount;
458 – extern int ypass;
459 – extern dlink_list class_items;
320   extern dlink_list server_items;
321   extern dlink_list cluster_items;
322 < extern dlink_list hub_items;
322 > extern dlink_list xconf_items;
323   extern dlink_list rxconf_items;
324   extern dlink_list rkconf_items;
325 < extern dlink_list leaf_items;
466 < extern dlink_list temporary_klines;
467 < extern dlink_list temporary_dlines;
468 < extern dlink_list temporary_glines;
469 < extern dlink_list temporary_xlines;
470 < extern dlink_list temporary_rxlines;
471 < extern dlink_list temporary_rklines;
325 > extern dlink_list service_items;
326   extern struct logging_entry ConfigLoggingEntry;
327   extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
328   extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
# Line 478 | Line 332 | extern struct admin_info AdminInfo;
332   extern int valid_wild_card(struct Client *, int, int, ...);
333   /* End GLOBAL section */
334  
335 < extern unsigned long get_sendq(struct Client *);
336 < extern const char *get_client_class(struct Client *);
337 < 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 *);
335 >
336 >
337 >
338   extern void init_ip_hash_table(void);
339 < extern void count_ip_hash(int *, unsigned long *);
339 > extern void count_ip_hash(unsigned int *, uint64_t *);
340   extern void remove_one_ip(struct irc_ssaddr *);
341 < extern struct ConfItem *make_conf_item(ConfType type);
491 < extern void free_access_item(struct AccessItem *);
341 > extern struct MaskItem *conf_make(enum maskitem_type);
342   extern void read_conf_files(int);
343 < extern int attach_conf(struct Client *, struct ConfItem *);
343 > extern int attach_conf(struct Client *, struct MaskItem *);
344   extern int attach_connect_block(struct Client *, const char *, const char *);
345 + extern int check_client(struct Client *);
346  
496 – extern int detach_conf(struct Client *, ConfType);
347  
348 < extern struct ConfItem *find_conf_name(dlink_list *, const char *, ConfType);
349 < extern struct ConfItem *find_conf_exact(ConfType, const char *, const char *, const char *);
350 < extern struct AccessItem *find_kill(struct Client *);
351 < extern struct AccessItem *find_gline(struct Client *);
348 > extern void detach_conf(struct Client *, enum maskitem_type);
349 > extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
350 > extern struct MaskItem *find_kill(struct Client *);
351 > extern struct MaskItem *find_gline(struct Client *);
352   extern int conf_connect_allowed(struct irc_ssaddr *, int);
353   extern char *oper_privs_as_string(const unsigned int);
354 < extern void split_nuh(char *mask, char **nick, char **user, char **host);
355 < extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
356 <                                                const char *, const char *, int);
357 < extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
354 > extern void split_nuh(struct split_nuh_item *);
355 > extern struct MaskItem *find_matching_name_conf(enum maskitem_type, const char *,
356 >                                                const char *, const char *, unsigned int);
357 > extern struct MaskItem *find_exact_name_conf(enum maskitem_type, const struct Client *, const char *,
358                                               const char *, const char *);
359 < extern void delete_conf_item(struct ConfItem *);
360 < extern void report_confitem_types(struct Client *, ConfType, int);
359 > extern void conf_free(struct MaskItem *);
360 > extern void report_confitem_types(struct Client *, enum maskitem_type);
361   extern void yyerror(const char *);
512 – extern int conf_yy_fatal_error(const char *);
513 – extern int conf_fbgets(char *, unsigned int, FBFILE *);
514 – extern void write_conf_line(struct Client *, struct ConfItem *,
515 –                            const char *, time_t);
516 – extern int remove_conf_line(ConfType, struct Client *, const char *,
517 –                            const char *);
518 – extern void add_temp_line(struct ConfItem *);
362   extern void cleanup_tklines(void *);
520 – extern const char *get_conf_name(ConfType);
363   extern int rehash(int);
364 < extern int conf_add_server(struct ConfItem *, unsigned int, const char *);
365 < extern void conf_add_class_to_conf(struct ConfItem *, const char *);
524 < extern void conf_add_d_conf(struct AccessItem *);
364 > extern int conf_add_server(struct MaskItem *, const char *);
365 > extern void conf_add_class_to_conf(struct MaskItem *, const char *);
366  
367 < /* XXX consider moving these into csvlib.h */
527 < extern void parse_csv_file(FBFILE *, ConfType);
367 > extern const char *get_oper_name(const struct Client *);
368  
529 – extern char *get_oper_name(const struct Client *);
530 –
531 – extern void *map_to_conf(struct ConfItem *);
532 – extern struct ConfItem *unmap_conf_item(void *);
369   /* XXX should the parse_aline stuff go into another file ?? */
370   #define AWILD 0x1               /* check wild cards */
535 – #define NOUSERLOOKUP 0x2 /* Don't lookup the user@host on /rkline nick */
371   extern int parse_aline(const char *, struct Client *, int, char **,
372                         int, char **, char **, time_t *, char **, char **);
373   extern int valid_comment(struct Client *, char *, int);
374  
540 – /* XXX */
541 – extern int yylex(void);
375  
376   #define TK_SECONDS 0
377   #define TK_MINUTES 1
378 < extern time_t valid_tkline(char *, int);
379 < extern int match_conf_password(const char *, const struct AccessItem *);
378 > extern time_t valid_tkline(const char *, int);
379 > extern int match_conf_password(const char *, const struct MaskItem *);
380  
381   #define NOT_AUTHORIZED    (-1)
382 < #define IRCD_SOCKET_ERROR (-2)
383 < #define I_LINE_FULL       (-3)
384 < #define TOO_MANY          (-4)
385 < #define BANNED_CLIENT     (-5)
553 < #define TOO_FAST          (-6)
382 > #define I_LINE_FULL       (-2)
383 > #define TOO_MANY          (-3)
384 > #define BANNED_CLIENT     (-4)
385 > #define TOO_FAST          (-5)
386  
387   #define CLEANUP_TKLINES_TIME 60
388  
389   extern void cluster_a_line(struct Client *,
390                             const char *, int, int, const char *,...);
559 – extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
560 –
391   #endif /* INCLUDED_s_conf_h */

Diff Legend

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