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/s_conf.h (file contents), Revision 1157 by michael, Tue Aug 9 22:03:59 2011 UTC vs.
ircd-hybrid/trunk/include/conf.h (file contents), Revision 1702 by michael, Thu Dec 20 15:49:20 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 25 | Line 25
25   #ifndef INCLUDED_s_conf_h
26   #define INCLUDED_s_conf_h
27   #include "config.h"
28 – #ifdef HAVE_LIBCRYPTO
29 – #include <openssl/rsa.h>
30 – #endif
31 – #include "fileio.h"             /* FBFILE */
28   #include "ircd_defs.h"
29   #include "motd.h"               /* MessageFile */
30   #include "client.h"
31   #include "hook.h"
32 + #include "conf_class.h"
33  
34  
35 < #define CONF_SERVER_INFO_TLS_VERSION_SSLV3 0x1
39 < #define CONF_SERVER_INFO_TLS_VERSION_TLSV1 0x2
40 <
41 < struct Client;
42 <
43 < extern struct Callback *client_check_cb;
35 > #define CONF_NOREASON "<No reason supplied>"
36  
37   struct conf_parser_context
38   {
39    unsigned int boot;
40    unsigned int pass;
41 <  FBFILE *conf_file;
41 >  FILE *conf_file;
42   };
43  
44   extern struct conf_parser_context conf_parser_ctx;
45  
46 < typedef enum
47 < {  
48 <  CONF_TYPE,
49 <  CLASS_TYPE,
50 <  OPER_TYPE,
51 <  CLIENT_TYPE,
52 <  SERVER_TYPE,
53 <  HUB_TYPE,
54 <  LEAF_TYPE,
55 <  KLINE_TYPE,
56 <  DLINE_TYPE,
57 <  EXEMPTDLINE_TYPE,
58 <  CLUSTER_TYPE,
59 <  RKLINE_TYPE,
60 <  RXLINE_TYPE,
61 <  XLINE_TYPE,    
62 <  ULINE_TYPE,
63 <  GLINE_TYPE,
64 <  CRESV_TYPE,    
65 <  NRESV_TYPE,
66 <  GDENY_TYPE,
75 <  SERVICE_TYPE
76 < } ConfType;
46 > enum maskitem_type
47 > {
48 >  CONF_RESERVED = 1 <<  0, /* XXX */
49 >  CONF_CLIENT   = 1 <<  1,
50 >  CONF_SERVER   = 1 <<  2,
51 >  CONF_KLINE    = 1 <<  3,
52 >  CONF_DLINE    = 1 <<  4,
53 >  CONF_EXEMPT   = 1 <<  5,
54 >  CONF_CLUSTER  = 1 <<  6,
55 >  CONF_RKLINE   = 1 <<  7,
56 >  CONF_RXLINE   = 1 <<  8,
57 >  CONF_XLINE    = 1 <<  9,
58 >  CONF_ULINE    = 1 << 10,
59 >  CONF_GLINE    = 1 << 11,
60 >  CONF_CRESV    = 1 << 12,
61 >  CONF_NRESV    = 1 << 13,
62 >  CONF_SERVICE  = 1 << 14,
63 >  CONF_OPER     = 1 << 15,
64 >  CONF_HUB      = 1 << 16, /* XXX There are no separate hub/leaf configs anymore. This is just for /stats h */
65 >  CONF_CLASS    = 1 << 17  /* XXX Same here; just for /stats Y|y */
66 > };
67  
68   struct split_nuh_item
69   {
# Line 89 | Line 79 | struct split_nuh_item
79    size_t hostsize;
80   };
81  
82 < struct ConfItem
93 < {
94 <  dlink_node node;      /* link into known ConfItems of this type */
95 <
96 <  char *name;           /* Primary key */
97 <  void *regexpname;
98 <  unsigned int flags;
99 <  ConfType type;
100 < };
101 <
102 < /*
103 < * MatchItem - used for XLINE and ULINE types
104 < */
105 < struct MatchItem
106 < {
107 <  char *user;           /* Used for ULINE only */
108 <  char *host;           /* Used for ULINE only */
109 <  char *reason;
110 <  char *oper_reason;
111 <  int action;           /* used for uline */
112 <  int count;            /* How many times this matchitem has been matched */
113 <  int ref_count;        /* How many times is this matchitem in use */
114 <  int illegal;          /* Should it be deleted when possible? */
115 <  time_t           hold;     /* Hold action until this time (calendar time) */
116 < };
117 <
118 < struct AccessItem
82 > struct MaskItem
83   {
84 <  dlink_node node;
85 <  unsigned int     dns_failed;
86 <  unsigned int     dns_pending;
87 <  unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
88 <  unsigned int     flags;
89 <  unsigned int     modes;
90 <  unsigned int     port;
91 <  int              clients;  /* Number of *LOCAL* clients using this */
92 <  struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
93 <  struct irc_ssaddr ipnum;      /* ip to connect to */
94 <  char *           host;     /* host part of user@host */
95 <  char *           passwd;
96 <  char *           spasswd;  /* Password to send. */
97 <  char *           reason;
98 <  char *           oper_reason;
99 <  char *           user;     /* user part of user@host */
100 <  time_t           hold;     /* Hold action until this time (calendar time) */
101 <  struct ConfItem *class_ptr;  /* Class of connection */
102 <  int              aftype;
103 < #ifdef HAVE_LIBCRYPTO
104 <  char *           rsa_public_key_file;
105 <  RSA *            rsa_public_key;
106 <  struct EncCapability *cipher_preference;
107 < #endif
108 <  void *regexuser;
109 <  void *regexhost;
110 < };
111 <
112 < struct ClassItem
113 < {
114 <  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
151 <  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
152 <  unsigned int max_sendq;
153 <  int con_freq;
154 <  int ping_freq;
155 <  int ping_warning;
156 <  int max_total;
157 <  int max_local;
158 <  int max_global;
159 <  int max_ident;
160 <  int max_perip;
161 <  int curr_user_count;
162 <  int cidr_bitlen_ipv4;
163 <  int cidr_bitlen_ipv6;
164 <  int number_per_cidr;
165 <  int active;
84 >  struct MaskItem   *hnext;
85 >  dlink_node         node;
86 >  dlink_list         leaf_list;
87 >  dlink_list         hub_list;
88 >  enum maskitem_type type;
89 >  unsigned int       dns_failed;
90 >  unsigned int       dns_pending;
91 >  unsigned int       flags;
92 >  unsigned int       modes;
93 >  unsigned int       port;
94 >  unsigned int       count;
95 >  unsigned int       aftype;
96 >  unsigned int       active;
97 >  unsigned int       htype;
98 >  unsigned int       ref_count;  /* Number of *LOCAL* clients using this */
99 >  int                bits;
100 >  time_t             until;     /* Hold action until this time (calendar time) */
101 >  time_t             setat;
102 >  struct irc_ssaddr  bind;  /* ip to bind to for outgoing connect */
103 >  struct irc_ssaddr  addr;  /* ip to connect to */
104 >  struct ClassItem  *class;  /* Class of connection */
105 >  char              *name;
106 >  char              *user;     /* user part of user@host */
107 >  char              *host;     /* host part of user@host */
108 >  char              *passwd;
109 >  char              *spasswd;  /* Password to send. */
110 >  char              *reason;
111 >  char              *cipher_list;
112 >  void              *rsa_public_key;
113 >  void              *regexuser;
114 >  void              *regexhost;
115   };
116  
117   struct CidrItem
118   {
119    dlink_node node;
120    struct irc_ssaddr mask;
121 <  int number_on_this_cidr;
121 >  unsigned int number_on_this_cidr;
122   };
123  
175 – #define ConFreq(x)      ((x)->con_freq)
176 – #define PingFreq(x)     ((x)->ping_freq)
177 – #define PingWarning(x)  ((x)->ping_warning)
178 – #define MaxTotal(x)     ((x)->max_total)
179 – #define MaxGlobal(x)    ((x)->max_global)
180 – #define MaxLocal(x)     ((x)->max_local)
181 – #define MaxIdent(x)     ((x)->max_ident)
182 – #define MaxPerIp(x)     ((x)->max_perip)
183 – #define MaxSendq(x)     ((x)->max_sendq)
184 – #define CurrUserCount(x) ((x)->curr_user_count)
185 – #define CidrBitlenIPV4(x)       ((x)->cidr_bitlen_ipv4)
186 – #define CidrBitlenIPV6(x)       ((x)->cidr_bitlen_ipv6)
187 – #define NumberPerCidr(x) ((x)->number_per_cidr)
188 –
189 – #define ClassPtr(x)      ((x)->class_ptr)
190 –
191 –
192 – #define CONF_ILLEGAL            0x80000000
193 – #define CONF_RESERVED           0x00000001
194 – #define CONF_CLIENT             0x00000002
195 – #define CONF_SERVER             0x00000004
196 – #define CONF_OPERATOR           0x00000008
197 – #define CONF_KILL               0x00000010
198 – #define CONF_KLINE              CONF_KILL
199 – #define CONF_CLASS              0x00000020
200 – #define CONF_LEAF               0x00000040
201 – #define CONF_LISTEN_PORT        0x00000080
202 – #define CONF_HUB                0x00000100
203 – #define CONF_EXEMPTKLINE        0x00000200
204 – #define CONF_NOLIMIT            0x00000400
205 – #define CONF_DLINE              0x00000800
206 – #define CONF_XLINE              0x00001000
207 – #define CONF_ULINE              0x00002000
208 – #define CONF_EXEMPTDLINE        0x00004000
209 – #define CONF_GLINE              0x00008000
210 – #define CONF_SERVICE            0x00010000
211 –
212 – #define CONF_SERVER_MASK       CONF_SERVER
213 – #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
214 –
215 – /* XXX temporary hack */
216 – #define CONF_CRESV              0x80000001
217 – #define CONF_NRESV              0x80000002
218 –
219 – #define IsConfIllegal(x)        ((x)->status & CONF_ILLEGAL)
220 – #define SetConfIllegal(x)       ((x)->status |= CONF_ILLEGAL)
221 – #define IsConfServer(x)         ((x)->status == CONF_SERVER)
222 – #define SetConfServer(x)        ((x)->status = CONF_SERVER)
223 – #define IsConfOperator(x)       ((x)->status & CONF_OPERATOR)
224 – #define IsConfHub(x)            ((x)->status == CONF_HUB)
225 – #define SetConfHub(x)           ((x)->status = CONF_HUB)
226 – #define IsConfLeaf(x)           ((x)->status == CONF_LEAF)
227 – #define SetConfLeaf(x)          ((x)->status = CONF_LEAF)
228 – #define IsConfHubOrLeaf(x)      ((x)->status & (CONF_HUB|CONF_LEAF))
229 – #define IsConfKill(x)           ((x)->status == CONF_KILL)
230 – #define IsConfClient(x)         ((x)->status & CONF_CLIENT)
231 – #define IsConfTypeOfClient(x)   ((x)->status & CONF_CLIENT_MASK)
232 – #define IsConfUline(x)          ((x)->status & CONF_ULINE)
233 – #define IsConfXline(x)          ((x)->status & CONF_XLINE)
234 – #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... */
239 < /* 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
258 < #define CONF_FLAGS_LAZY_LINK            0x00008000
259 < #define CONF_FLAGS_ENCRYPTED            0x00010000
260 < #define CONF_FLAGS_COMPRESSED           0x00020000
261 < #define CONF_FLAGS_TEMPORARY            0x00040000
262 < #define CONF_FLAGS_CRYPTLINK            0x00080000
263 < #define CONF_FLAGS_BURST_AWAY           0x00400000
264 < #define CONF_FLAGS_EXEMPTRESV           0x00800000
265 < #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  
150 < /* Macros for struct AccessItem */
150 > /* Macros for struct MaskItem */
151   #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
152   #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
153   #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
# Line 275 | Line 158 | struct CidrItem
158   #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
159   #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
160   #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
278 – #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
161   #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
162   #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
163   #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
282 – #define IsConfRestricted(x)     ((x)->flags & CONF_FLAGS_RESTRICTED)
164   #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
165   #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
166   #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
286 – #define IsConfCompressed(x)     ((x)->flags & CONF_FLAGS_COMPRESSED)
287 – #define SetConfCompressed(x)    ((x)->flags |= CONF_FLAGS_COMPRESSED)
288 – #define ClearConfCompressed(x)  ((x)->flags &= ~CONF_FLAGS_COMPRESSED)
289 – #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
290 – #define SetConfCryptLink(x)     ((x)->flags |= CONF_FLAGS_CRYPTLINK)
291 – #define ClearConfCryptLink(x)   ((x)->flags &= ~CONF_FLAGS_CRYPTLINK)
167   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
168   #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
169   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
295 – #define IsConfTemporary(x)      ((x)->flags & CONF_FLAGS_TEMPORARY)
296 – #define SetConfTemporary(x)     ((x)->flags |= CONF_FLAGS_TEMPORARY)
170   #define IsConfRedir(x)          ((x)->flags & CONF_FLAGS_REDIR)
171 < #define IsConfAwayBurst(x)      ((x)->flags & CONF_FLAGS_BURST_AWAY)
172 < #define SetConfAwayBurst(x)     ((x)->flags |= CONF_FLAGS_BURST_AWAY)
173 < #define ClearConfAwayBurst(x)   ((x)->flags &= ~CONF_FLAGS_BURST_AWAY)
174 < #define IsConfTopicBurst(x)     ((x)->flags & CONF_FLAGS_TOPICBURST)
175 < #define SetConfTopicBurst(x)    ((x)->flags |= CONF_FLAGS_TOPICBURST)
176 < #define ClearConfTopicBurst(x)  ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
171 > #define IsConfSSL(x)      ((x)->flags & CONF_FLAGS_SSL)
172 > #define SetConfSSL(x)     ((x)->flags |= CONF_FLAGS_SSL)
173 > #define ClearConfSSL(x)   ((x)->flags &= ~CONF_FLAGS_SSL)
174 > #define IsConfDatabase(x)      ((x)->flags & CONF_FLAGS_IN_DATABASE)
175 > #define SetConfDatabase(x)     ((x)->flags |= CONF_FLAGS_IN_DATABASE)
176 >
177  
178   /* shared/cluster server entry types
179   * These defines are used for both shared and cluster.
180   */
181   #define SHARED_KLINE            0x0001
182 < #define SHARED_TKLINE           0x0002
183 < #define SHARED_UNKLINE          0x0004
184 < #define SHARED_XLINE            0x0008
185 < #define SHARED_TXLINE           0x0010
186 < #define SHARED_UNXLINE          0x0020
187 < #define SHARED_RESV             0x0040
188 < #define SHARED_TRESV            0x0080
189 < #define SHARED_UNRESV           0x0100
190 < #define SHARED_LOCOPS           0x0200
191 < #define SHARED_ALL              (SHARED_KLINE | SHARED_TKLINE | SHARED_UNKLINE | \
192 <                                 SHARED_XLINE | SHARED_TXLINE | SHARED_UNXLINE | \
193 <                                 SHARED_RESV | SHARED_TRESV | SHARED_UNRESV |\
321 <                                 SHARED_LOCOPS)
322 <
323 < /* gline acl entry actions */
324 < #define GDENY_BLOCK             0x1
325 < #define GDENY_REJECT            0x2
182 > #define SHARED_UNKLINE          0x0002
183 > #define SHARED_XLINE            0x0004
184 > #define SHARED_UNXLINE          0x0008
185 > #define SHARED_RESV             0x0010
186 > #define SHARED_UNRESV           0x0020
187 > #define SHARED_LOCOPS           0x0040
188 > #define SHARED_DLINE            0x0080
189 > #define SHARED_UNDLINE          0x0100
190 > #define SHARED_ALL              (SHARED_KLINE | SHARED_UNKLINE |\
191 >                                 SHARED_XLINE | SHARED_UNXLINE |\
192 >                                 SHARED_RESV | SHARED_UNRESV |\
193 >                                 SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
194  
195   struct config_file_entry
196   {
197    const char *dpath;          /* DPATH if set from command line */
198    const char *configfile;
199    const char *klinefile;
200 +  const char *glinefile;
201    const char *xlinefile;
333 –  const char *rxlinefile;
334 –  const char *rklinefile;
202    const char *dlinefile;
203 <  const char *glinefile;
337 <  const char *cresvfile;
338 <  const char *nresvfile;
339 <
340 <  char *logpath;
341 <  char *operlog;
203 >  const char *resvfile;
204  
343 –  char *servlink_path;
205    char *egdpool_path;
206    char *service_name;
207  
208    MessageFile motd;
348 –  MessageFile opermotd;
209    MessageFile linksfile;
210  
351 –  unsigned char compression_level;
211    int gline_min_cidr;
212    int gline_min_cidr6;
213    int dots_in_ident;
# Line 361 | Line 220 | struct config_file_entry
220    int ts_max_delta;
221    int ts_warn_delta;
222    int anti_nick_flood;
364 –  int kline_with_reason;
223    int warn_no_nline;
224    int invisible_on_connect;
225    int stats_e_disabled;
# Line 375 | Line 233 | struct config_file_entry
233    int oper_pass_resv;
234    int glines;
235    int hide_spoof_ips;
378 –  int burst_away;
379 –  int use_whois_actually;
236    int tkline_expire_notices;
237    int opers_bypass_callerid;
238    int ignore_bogus_ts;
383 –  char *kline_reason;
239    int pace_wait;
240    int pace_wait_simple;
241    int gline_time;
242 <  int gline_logging;
388 <  int idletime;
242 >  int gline_request_time;
243    int oper_only_umodes;
244    int oper_umodes;
245    int max_targets;
# Line 394 | Line 248 | struct config_file_entry
248    int min_nonwildcard_simple;
249    int kill_chase_time_limit;
250    int default_floodcount;
397 –  int client_flood;
251    /* 0 == don't use throttle... */
252    int throttle_time;
253    int use_egd;
254    int ping_cookie;
255    int disable_auth;
256    int disable_remote;
404 – #ifdef HAVE_LIBCRYPTO
405 –  struct EncCapability *default_cipher_preference;
406 – #endif
257   };
258  
259   struct config_channel_entry
260   {
261    int disable_fake_channels;
262    int restrict_channels;
413 –  int disable_local_channels;
414 –  int use_except;
415 –  int use_invex;
416 –  int use_knock;
263    int knock_delay;
264    int knock_delay_channel;
265    unsigned int max_bans;
266    unsigned int max_chans_per_user;
267 +  unsigned int max_chans_per_oper;
268    int no_create_on_split;
269    int no_join_on_split;
270    int quiet_on_ban;
424 –  int burst_topicwho;
271    int default_split_server_count;
272    int default_split_user_count;
273   };
# Line 434 | Line 280 | struct config_server_hide
280    int links_delay;
281    int links_disabled;
282    int hidden;
437 –  int disable_hidden;
283    int hide_server_ips;
284   };
285  
# Line 445 | Line 290 | struct server_info
290    char *description;
291    char *network_name;
292    char *network_desc;
448 – #ifdef HAVE_LIBCRYPTO
293    char *rsa_private_key_file;
294 <  RSA *rsa_private_key;
295 <  SSL_CTX *server_ctx;
296 <  SSL_CTX *client_ctx;
453 <  unsigned int tls_version;
454 < #endif
294 >  void *rsa_private_key;
295 >  void *server_ctx;
296 >  void *client_ctx;
297    int hub;
298    struct irc_ssaddr ip;
299    struct irc_ssaddr ip6;
# Line 472 | Line 314 | struct admin_info
314   struct logging_entry
315   {
316    unsigned int use_logging;
475 –  char operlog[PATH_MAX + 1];
476 –  char userlog[PATH_MAX + 1];
477 –  char glinelog[PATH_MAX + 1];
478 –  char ioerrlog[PATH_MAX + 1];
479 –  char klinelog[PATH_MAX + 1];
480 –  char killlog[PATH_MAX + 1];
481 –  char operspylog[PATH_MAX + 1];
482 –  char failed_operlog[PATH_MAX + 1];
317   };
318  
485 – extern dlink_list gdeny_items;
486 – extern dlink_list class_items;
319   extern dlink_list server_items;
320   extern dlink_list cluster_items;
321 < extern dlink_list hub_items;
321 > extern dlink_list xconf_items;
322   extern dlink_list rxconf_items;
323   extern dlink_list rkconf_items;
492 – extern dlink_list leaf_items;
324   extern dlink_list service_items;
494 – extern dlink_list temporary_klines;
495 – extern dlink_list temporary_dlines;
496 – extern dlink_list temporary_glines;
497 – extern dlink_list temporary_xlines;
498 – extern dlink_list temporary_rxlines;
499 – extern dlink_list temporary_rklines;
325   extern struct logging_entry ConfigLoggingEntry;
326   extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
327   extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
# Line 506 | Line 331 | extern struct admin_info AdminInfo;
331   extern int valid_wild_card(struct Client *, int, int, ...);
332   /* End GLOBAL section */
333  
334 < extern unsigned int get_sendq(struct Client *);
335 < extern const char *get_client_class(struct Client *);
336 < extern int get_client_ping(struct Client *, int *);
512 < extern void check_class(void);
513 < extern void init_class(void);
514 < extern struct ConfItem *find_class(const char *);
334 >
335 >
336 >
337   extern void init_ip_hash_table(void);
338   extern void count_ip_hash(unsigned int *, uint64_t *);
339   extern void remove_one_ip(struct irc_ssaddr *);
340 < extern struct ConfItem *make_conf_item(ConfType type);
519 < extern void free_access_item(struct AccessItem *);
340 > extern struct MaskItem *conf_make(enum maskitem_type);
341   extern void read_conf_files(int);
342 < extern int attach_conf(struct Client *, struct ConfItem *);
342 > extern int attach_conf(struct Client *, struct MaskItem *);
343   extern int attach_connect_block(struct Client *, const char *, const char *);
344 + extern int check_client(struct Client *);
345  
524 – extern int detach_conf(struct Client *, ConfType);
346  
347 < extern struct ConfItem *find_conf_name(dlink_list *, const char *, ConfType);
348 < extern struct ConfItem *find_conf_exact(ConfType, const char *, const char *, const char *);
349 < extern struct AccessItem *find_kill(struct Client *);
350 < extern struct AccessItem *find_gline(struct Client *);
347 > extern void detach_conf(struct Client *, enum maskitem_type);
348 > extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
349 > extern struct MaskItem *find_kill(struct Client *);
350 > extern struct MaskItem *find_gline(struct Client *);
351   extern int conf_connect_allowed(struct irc_ssaddr *, int);
352   extern char *oper_privs_as_string(const unsigned int);
353   extern void split_nuh(struct split_nuh_item *);
354 < extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
355 <                                                const char *, const char *, int);
356 < extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
354 > extern struct MaskItem *find_matching_name_conf(enum maskitem_type, const char *,
355 >                                                const char *, const char *, unsigned int);
356 > extern struct MaskItem *find_exact_name_conf(enum maskitem_type, const struct Client *, const char *,
357                                               const char *, const char *);
358 < extern void delete_conf_item(struct ConfItem *);
359 < extern void report_confitem_types(struct Client *, ConfType, int);
358 > extern void conf_free(struct MaskItem *);
359 > extern void report_confitem_types(struct Client *, enum maskitem_type);
360   extern void yyerror(const char *);
540 – extern int conf_yy_fatal_error(const char *);
541 – extern int conf_fbgets(char *, unsigned int, FBFILE *);
542 – extern void write_conf_line(struct Client *, struct ConfItem *,
543 –                            const char *, time_t);
544 – extern int remove_conf_line(ConfType, struct Client *, const char *,
545 –                            const char *);
546 – extern void add_temp_line(struct ConfItem *);
361   extern void cleanup_tklines(void *);
548 – extern const char *get_conf_name(ConfType);
362   extern int rehash(int);
363 < extern int conf_add_server(struct ConfItem *, const char *);
364 < extern void conf_add_class_to_conf(struct ConfItem *, const char *);
363 > extern void lookup_confhost(struct MaskItem *);
364 > extern void conf_add_class_to_conf(struct MaskItem *, const char *);
365  
366 < /* XXX consider moving these into csvlib.h */
554 < extern void parse_csv_file(FBFILE *, ConfType);
366 > extern const char *get_oper_name(const struct Client *);
367  
556 – extern char *get_oper_name(const struct Client *);
557 –
558 – extern void *map_to_conf(struct ConfItem *);
559 – extern struct ConfItem *unmap_conf_item(void *);
368   /* XXX should the parse_aline stuff go into another file ?? */
369   #define AWILD 0x1               /* check wild cards */
562 – #define NOUSERLOOKUP 0x2 /* Don't lookup the user@host on /rkline nick */
370   extern int parse_aline(const char *, struct Client *, int, char **,
371                         int, char **, char **, time_t *, char **, char **);
372   extern int valid_comment(struct Client *, char *, int);
# Line 568 | Line 375 | extern int valid_comment(struct Client *
375   #define TK_SECONDS 0
376   #define TK_MINUTES 1
377   extern time_t valid_tkline(const char *, int);
378 < extern int match_conf_password(const char *, const struct AccessItem *);
378 > extern int match_conf_password(const char *, const struct MaskItem *);
379  
380   #define NOT_AUTHORIZED    (-1)
381   #define I_LINE_FULL       (-2)
# Line 580 | Line 387 | extern int match_conf_password(const cha
387  
388   extern void cluster_a_line(struct Client *,
389                             const char *, int, int, const char *,...);
583 – extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
584 –
585 – /* XXX **/
586 – extern int yylex(void);
587 –
390   #endif /* INCLUDED_s_conf_h */

Diff Legend

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