ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/include/s_conf.h
Revision: 131
Committed: Sat Oct 15 16:22:20 2005 UTC (20 years, 9 months ago) by db
Content type: text/x-chdr
File size: 20378 byte(s)
Log Message:
- Make delete_conf_item() table driven

Still not quite done.


File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 * s_conf.h: A header for the configuration functions.
4 *
5 * Copyright (C) 2005 by the past and present ircd coders, and others.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 * USA
21 *
22 * $Id$
23 */
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 "ircd_defs.h"
32 #include "motd.h" /* MessageFile */
33 #include "client.h"
34
35 struct Client;
36 struct DNSReply;
37 struct hostent;
38
39 extern FBFILE *conf_fbfile_in;
40 extern struct Callback *client_check_cb;
41
42
43 struct CidrItem
44 {
45 struct irc_ssaddr mask;
46 int number_on_this_cidr;
47 dlink_node node;
48 };
49
50 #define ConFreq(x) ((x)->con_freq)
51 #define PingFreq(x) ((x)->ping_freq)
52 #define PingWarning(x) ((x)->ping_warning)
53 #define MaxTotal(x) ((x)->max_total)
54 #define MaxGlobal(x) ((x)->max_global)
55 #define MaxLocal(x) ((x)->max_local)
56 #define MaxIdent(x) ((x)->max_ident)
57 #define MaxPerIp(x) ((x)->max_perip)
58 #define MaxSendq(x) ((x)->max_sendq)
59 #define CurrUserCount(x) ((x)->curr_user_count)
60 #define CidrBitlenIPV4(x) ((x)->cidr_bitlen_ipv4)
61 #define CidrBitlenIPV6(x) ((x)->cidr_bitlen_ipv6)
62 #define NumberPerCidr(x) ((x)->number_per_cidr)
63
64 #define ClassPtr(x) ((x)->class_ptr)
65
66
67 #define CONF_ILLEGAL 0x80000000
68 #define CONF_RESERVED 0x00000001
69 #define CONF_CLIENT 0x00000002
70 #define CONF_SERVER 0x00000004
71 #define CONF_OPERATOR 0x00000008
72 #define CONF_KILL 0x00000010
73 #define CONF_KLINE CONF_KILL
74 #define CONF_CLASS 0x00000020
75 #define CONF_LEAF 0x00000040
76 #define CONF_LISTEN_PORT 0x00000080
77 #define CONF_HUB 0x00000100
78 #define CONF_EXEMPTKLINE 0x00000200
79 #define CONF_NOLIMIT 0x00000400
80 #define CONF_DLINE 0x00000800
81 #define CONF_XLINE 0x00001000
82 #define CONF_ULINE 0x00002000
83 #define CONF_EXEMPTDLINE 0x00004000
84 #define CONF_GLINE 0x00008000
85
86 #define CONF_SERVER_MASK CONF_SERVER
87 #define CONF_CLIENT_MASK (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
88
89 /* XXX temporary hack */
90 #define CONF_CRESV 0x80000001
91 #define CONF_NRESV 0x80000002
92
93 #define IsConfIllegal(x) ((x)->status & CONF_ILLEGAL)
94 #define SetConfIllegal(x) ((x)->status |= CONF_ILLEGAL)
95 #define IsConfServer(x) ((x)->status == CONF_SERVER)
96 #define SetConfServer(x) ((x)->status = CONF_SERVER)
97 #define IsConfOperator(x) ((x)->status & CONF_OPERATOR)
98 #define IsConfHub(x) ((x)->status == CONF_HUB)
99 #define SetConfHub(x) ((x)->status = CONF_HUB)
100 #define IsConfLeaf(x) ((x)->status == CONF_LEAF)
101 #define SetConfLeaf(x) ((x)->status = CONF_LEAF)
102 #define IsConfHubOrLeaf(x) ((x)->status & (CONF_HUB|CONF_LEAF))
103 #define IsConfKill(x) ((x)->status == CONF_KILL)
104 #define IsConfClient(x) ((x)->status & CONF_CLIENT)
105 #define IsConfTypeOfClient(x) ((x)->status & CONF_CLIENT_MASK)
106 #define IsConfUline(x) ((x)->status & CONF_ULINE)
107 #define IsConfXline(x) ((x)->status & CONF_XLINE)
108 #define IsConfGline(x) ((x)->status == CONF_GLINE)
109
110 /* AccessItem->flags */
111
112 /* Generic flags... */
113 /* access flags... */
114 #define CONF_FLAGS_DO_IDENTD 0x00000001
115 #define CONF_FLAGS_LIMIT_IP 0x00000002
116 #define CONF_FLAGS_NO_TILDE 0x00000004
117 #define CONF_FLAGS_NEED_IDENTD 0x00000008
118 /* 0x00000010 */
119 #define CONF_FLAGS_NOMATCH_IP 0x00000020
120 #define CONF_FLAGS_EXEMPTKLINE 0x00000040
121 #define CONF_FLAGS_NOLIMIT 0x00000080
122 #define CONF_FLAGS_IDLE_LINED 0x00000100
123 #define CONF_FLAGS_SPOOF_IP 0x00000200
124 #define CONF_FLAGS_SPOOF_NOTICE 0x00000400
125 #define CONF_FLAGS_REDIR 0x00000800
126 #define CONF_FLAGS_EXEMPTGLINE 0x00001000
127 #define CONF_FLAGS_RESTRICTED 0x00002000
128 #define CONF_FLAGS_CAN_FLOOD 0x00100000
129 #define CONF_FLAGS_NEED_PASSWORD 0x00200000
130 /* server flags */
131 #define CONF_FLAGS_ALLOW_AUTO_CONN 0x00004000
132 #define CONF_FLAGS_LAZY_LINK 0x00008000
133 #define CONF_FLAGS_ENCRYPTED 0x00010000
134 #define CONF_FLAGS_COMPRESSED 0x00020000
135 #define CONF_FLAGS_TEMPORARY 0x00040000
136 #define CONF_FLAGS_CRYPTLINK 0x00080000
137 #define CONF_FLAGS_BURST_AWAY 0x00400000
138 #define CONF_FLAGS_EXEMPTRESV 0x00800000
139 #define CONF_FLAGS_TOPICBURST 0x01000000
140
141 /* Macros for struct AccessItem */
142 #define IsLimitIp(x) ((x)->flags & CONF_FLAGS_LIMIT_IP)
143 #define IsNoTilde(x) ((x)->flags & CONF_FLAGS_NO_TILDE)
144 #define IsConfCanFlood(x) ((x)->flags & CONF_FLAGS_CAN_FLOOD)
145 #define IsNeedPassword(x) ((x)->flags & CONF_FLAGS_NEED_PASSWORD)
146 #define IsNeedIdentd(x) ((x)->flags & CONF_FLAGS_NEED_IDENTD)
147 #define IsNoMatchIp(x) ((x)->flags & CONF_FLAGS_NOMATCH_IP)
148 #define IsConfExemptKline(x) ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
149 #define IsConfExemptLimits(x) ((x)->flags & CONF_FLAGS_NOLIMIT)
150 #define IsConfExemptGline(x) ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
151 #define IsConfExemptResv(x) ((x)->flags & CONF_FLAGS_EXEMPTRESV)
152 #define IsConfIdlelined(x) ((x)->flags & CONF_FLAGS_IDLE_LINED)
153 #define IsConfDoIdentd(x) ((x)->flags & CONF_FLAGS_DO_IDENTD)
154 #define IsConfDoSpoofIp(x) ((x)->flags & CONF_FLAGS_SPOOF_IP)
155 #define IsConfSpoofNotice(x) ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
156 #define IsConfRestricted(x) ((x)->flags & CONF_FLAGS_RESTRICTED)
157 #define IsConfEncrypted(x) ((x)->flags & CONF_FLAGS_ENCRYPTED)
158 #define SetConfEncrypted(x) ((x)->flags |= CONF_FLAGS_ENCRYPTED)
159 #define ClearConfEncrypted(x) ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
160 #define IsConfCompressed(x) ((x)->flags & CONF_FLAGS_COMPRESSED)
161 #define SetConfCompressed(x) ((x)->flags |= CONF_FLAGS_COMPRESSED)
162 #define ClearConfCompressed(x) ((x)->flags &= ~CONF_FLAGS_COMPRESSED)
163 #define IsConfCryptLink(x) ((x)->flags & CONF_FLAGS_CRYPTLINK)
164 #define SetConfCryptLink(x) ((x)->flags |= CONF_FLAGS_CRYPTLINK)
165 #define ClearConfCryptLink(x) ((x)->flags &= ~CONF_FLAGS_CRYPTLINK)
166 #define IsConfLazyLink(x) ((x)->flags & CONF_FLAGS_LAZY_LINK)
167 #define SetConfLazyLink(x) ((x)->flags = CONF_FLAGS_LAZY_LINK)
168 #define ClearConfLazyLink(x) ((x)->flags &= ~CONF_FLAGS_LAZY_LINK)
169 #define IsConfAllowAutoConn(x) ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
170 #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
171 #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
172 #define IsConfTemporary(x) ((x)->flags & CONF_FLAGS_TEMPORARY)
173 #define SetConfTemporary(x) ((x)->flags |= CONF_FLAGS_TEMPORARY)
174 #define IsConfRedir(x) ((x)->flags & CONF_FLAGS_REDIR)
175 #define IsConfAwayBurst(x) ((x)->flags & CONF_FLAGS_BURST_AWAY)
176 #define SetConfAwayBurst(x) ((x)->flags |= CONF_FLAGS_BURST_AWAY)
177 #define ClearConfAwayBurst(x) ((x)->flags &= ~CONF_FLAGS_BURST_AWAY)
178 #define IsConfTopicBurst(x) ((x)->flags & CONF_FLAGS_TOPICBURST)
179 #define SetConfTopicBurst(x) ((x)->flags |= CONF_FLAGS_TOPICBURST)
180 #define ClearConfTopicBurst(x) ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
181
182 /* shared/cluster server entry types
183 * These defines are used for both shared and cluster.
184 */
185 #define SHARED_KLINE 0x0001
186 #define SHARED_TKLINE 0x0002
187 #define SHARED_UNKLINE 0x0004
188 #define SHARED_XLINE 0x0008
189 #define SHARED_TXLINE 0x0010
190 #define SHARED_UNXLINE 0x0020
191 #define SHARED_RESV 0x0040
192 #define SHARED_TRESV 0x0080
193 #define SHARED_UNRESV 0x0100
194 #define SHARED_LOCOPS 0x0200
195 #define SHARED_ALL (SHARED_KLINE | SHARED_TKLINE | SHARED_UNKLINE | \
196 SHARED_XLINE | SHARED_TXLINE | SHARED_UNXLINE | \
197 SHARED_RESV | SHARED_TRESV | SHARED_UNRESV |\
198 SHARED_LOCOPS)
199
200 /* gline acl entry actions */
201 #define GDENY_BLOCK 0x1
202 #define GDENY_REJECT 0x2
203
204 typedef enum
205 {
206 CONF_TYPE,
207 CLASS_TYPE,
208 OPER_TYPE,
209 CLIENT_TYPE,
210 SERVER_TYPE,
211 HUB_TYPE,
212 LEAF_TYPE,
213 KLINE_TYPE,
214 DLINE_TYPE,
215 EXEMPTDLINE_TYPE,
216 CLUSTER_TYPE,
217 RKLINE_TYPE,
218 RXLINE_TYPE,
219 XLINE_TYPE,
220 ULINE_TYPE,
221 GLINE_TYPE,
222 CRESV_TYPE,
223 NRESV_TYPE,
224 GDENY_TYPE
225 } ConfType;
226
227
228 /*
229 * MatchItem - used for XLINE and ULINE types
230 */
231 struct MatchItem
232 {
233 char *user; /* Used for ULINE only */
234 char *host; /* Used for ULINE only */
235 char *reason;
236 char *oper_reason;
237 int action; /* used for uline */
238 int count; /* How many times this matchitem has been matched */
239 int ref_count; /* How many times is this matchitem in use */
240 int illegal; /* Should it be deleted when possible? */
241 time_t hold; /* Hold action until this time (calendar time) */
242 };
243
244 struct AccessItem
245 {
246 dlink_node node;
247 unsigned int status; /* If CONF_ILLEGAL, delete when no clients */
248 unsigned int flags;
249 unsigned int modes;
250 int clients; /* Number of *LOCAL* clients using this */
251 struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
252 struct irc_ssaddr ipnum; /* ip to connect to */
253 char * host; /* host part of user@host */
254 char * passwd;
255 char * spasswd; /* Password to send. */
256 char * reason;
257 char * oper_reason;
258 char * user; /* user part of user@host */
259 int port;
260 char * fakename; /* Mask name */
261 time_t hold; /* Hold action until this time (calendar time) */
262 struct ConfItem *class_ptr; /* Class of connection */
263 struct DNSQuery* dns_query;
264 int aftype;
265 #ifdef HAVE_LIBCRYPTO
266 char * rsa_public_key_file;
267 RSA * rsa_public_key;
268 struct EncCapability *cipher_preference;
269 #endif
270 pcre *regexuser;
271 pcre *regexhost;
272 };
273
274 struct ClassItem
275 {
276 long max_sendq;
277 int con_freq;
278 int ping_freq;
279 int ping_warning;
280 int max_total;
281 int max_local;
282 int max_global;
283 int max_ident;
284 int max_perip;
285 int curr_user_count;
286 int cidr_bitlen_ipv4;
287 int cidr_bitlen_ipv6;
288 int number_per_cidr;
289 dlink_list list_ipv4; /* base of per cidr ipv4 client link list */
290 dlink_list list_ipv6; /* base of per cidr ipv6 client link list */
291 };
292
293 struct ConfItem
294 {
295 char *name; /* Primary key */
296 pcre *regexpname;
297 dlink_node node; /* link into known ConfItems of this type */
298 unsigned int flags;
299 ConfType type;
300 #if 0
301 union conf
302 {
303 struct MatchItem;
304 struct AccessItem;
305 struct ClassItem;
306 }
307 #endif
308 };
309
310 struct conf_item_table_type
311 {
312 size_t size;
313 int status;
314 dlink_list *list;
315 void (*freer)(struct ConfItem *, dlink_list *);
316 };
317
318 #if 0
319 /* general conf items link list root, other than k lines etc. */
320 dlink_list server_items = { NULL, NULL, 0 };
321 dlink_list cluster_items = { NULL, NULL, 0 };
322 dlink_list hub_items = { NULL, NULL, 0 };
323 dlink_list leaf_items = { NULL, NULL, 0 };
324 dlink_list oconf_items = { NULL, NULL, 0 };
325 dlink_list uconf_items = { NULL, NULL, 0 };
326 dlink_list xconf_items = { NULL, NULL, 0 };
327 dlink_list rxconf_items = { NULL, NULL, 0 };
328 dlink_list rkconf_items = { NULL, NULL, 0 };
329 dlink_list nresv_items = { NULL, NULL, 0 };
330 dlink_list class_items = { NULL, NULL, 0 };
331 dlink_list gdeny_items = { NULL, NULL, 0 };
332
333 struct conf_item_table_type conf_item_table[] =
334 {
335 /* CONF_TYPE */
336 { 0, 0 , 0},
337 /* CLASS_TYPE */
338 { sizeof(struct ConfItem) + sizeof(struct ClassItem), 0, &class_items },
339 /* OPER_TYPE */
340 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_OPERATOR,
341 &oconf_items },
342 /* CLIENT_TYPE */
343 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_CLIENT, NULL },
344 /* SERVER_TYPE */
345 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_SERVER,
346 &server_items },
347 /* HUB_TYPE */
348 { sizeof(struct ConfItem) + sizeof(struct MatchItem), 0, &hub_items },
349 /* LEAF_TYPE */
350 { sizeof(struct ConfItem) + sizeof(struct MatchItem), 0, &leaf_items },
351 /* KLINE_TYPE */
352 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_KLINE, NULL },
353 /* DLINE_TYPE */
354 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_DLINE, NULL },
355 /* EXEMPTDLINE_TYPE */
356 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_EXEMPTDLINE,
357 NULL },
358 /* CLUSTER_TYPE */
359 { sizeof(struct ConfItem) , 0, &cluster_items },
360 /* RKLINE_TYPE */
361 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_KLINE,
362 &rkconf_items },
363 /* RXLINE_TYPE */
364 { sizeof(struct ConfItem) + sizeof(struct MatchItem), CONF_KLINE,
365 &rxconf_items },
366 /* XLINE_TYPE */
367 { sizeof(struct ConfItem) + sizeof(struct AccessItem), 0, &xconf_items },
368 /* ULINE_TYPE */
369 { sizeof(struct ConfItem) + sizeof(struct AccessItem), 0, &uconf_items },
370 /* GLINE_TYPE */
371 { sizeof(struct ConfItem) + sizeof(struct AccessItem), CONF_GLINE, NULL },
372 /* CRESV_TYPE */
373 { sizeof(struct ConfItem) + sizeof(struct MatchItem), 0, NULL },
374 /* NRESV_TYPE */
375 { sizeof(struct ConfItem) + sizeof(struct MatchItem), 0, &nresv_items },
376 /* GDENY_TYPE */
377 { sizeof(struct ConfItem) + sizeof(struct AccessItem), 0, &gdeny_items },
378 { 0, 0, 0}
379 };
380 #endif
381
382 struct config_file_entry
383 {
384 const char *dpath; /* DPATH if set from command line */
385 const char *configfile;
386 const char *klinefile;
387 const char *xlinefile;
388 const char *rxlinefile;
389 const char *rklinefile;
390 const char *dlinefile;
391 const char *glinefile;
392 const char *cresvfile;
393 const char *nresvfile;
394
395 char *logpath;
396 char *operlog;
397
398 char *servlink_path;
399 char *egdpool_path;
400
401 MessageFile motd;
402 MessageFile opermotd;
403 MessageFile linksfile;
404
405 unsigned char compression_level;
406 int gline_min_cidr;
407 int gline_min_cidr6;
408 int dot_in_ip6_addr;
409 int dots_in_ident;
410 int failed_oper_notice;
411 int anti_spam_exit_message_time;
412 int max_accept;
413 int max_nick_time;
414 int max_nick_changes;
415 int ts_max_delta;
416 int ts_warn_delta;
417 int anti_nick_flood;
418 int kline_with_reason;
419 int warn_no_nline;
420 int invisible_on_connect;
421 int stats_o_oper_only;
422 int stats_k_oper_only;
423 int stats_i_oper_only;
424 int stats_P_oper_only;
425 int short_motd;
426 int no_oper_flood;
427 int true_no_oper_flood;
428 int oper_pass_resv;
429 int glines;
430 int hide_spoof_ips;
431 int burst_away;
432 int use_whois_actually;
433 int tkline_expire_notices;
434 int opers_bypass_callerid;
435 int ignore_bogus_ts;
436 char *kline_reason;
437 int pace_wait;
438 int pace_wait_simple;
439 int gline_time;
440 int gline_logging;
441 int idletime;
442 int oper_only_umodes;
443 int oper_umodes;
444 int max_targets;
445 int caller_id_wait;
446 int min_nonwildcard;
447 int min_nonwildcard_simple;
448 int kill_chase_time_limit;
449 int default_floodcount;
450 int client_flood;
451 /* 0 == don't use throttle... */
452 int throttle_time;
453 int use_egd;
454 int ping_cookie;
455 int disable_auth;
456 int disable_remote;
457 #ifdef HAVE_LIBCRYPTO
458 struct EncCapability *default_cipher_preference;
459 #endif
460 };
461
462 struct config_channel_entry
463 {
464 int restrict_channels;
465 int disable_local_channels;
466 int use_except;
467 int use_invex;
468 int use_knock;
469 int knock_delay;
470 int knock_delay_channel;
471 int invite_ops_only;
472 unsigned int max_bans;
473 unsigned int max_chans_per_user;
474 int no_create_on_split;
475 int no_join_on_split;
476 int quiet_on_ban;
477 int burst_topicwho;
478 int default_split_server_count;
479 int default_split_user_count;
480 };
481
482 struct config_server_hide
483 {
484 int flatten_links;
485 int hide_servers;
486 char *hidden_name;
487 int links_delay;
488 int links_disabled;
489 int hidden;
490 int disable_hidden;
491 int hide_server_ips;
492 };
493
494 struct server_info
495 {
496 char *name;
497 char *description;
498 char *network_name;
499 char *network_desc;
500 #ifdef HAVE_LIBCRYPTO
501 char *rsa_private_key_file;
502 RSA *rsa_private_key;
503 SSL_CTX *ctx;
504 #endif
505 char *sid;
506 int hub;
507 struct irc_ssaddr ip;
508 struct irc_ssaddr ip6;
509 int max_clients;
510 int specific_ipv4_vhost;
511 int specific_ipv6_vhost;
512 struct sockaddr_in dns_host;
513 int can_use_v6;
514 };
515
516 struct admin_info
517 {
518 char *name;
519 char *description;
520 char *email;
521 };
522
523 struct logging_entry
524 {
525 unsigned int use_logging;
526 char operlog[PATH_MAX + 1];
527 char userlog[PATH_MAX + 1];
528 char glinelog[PATH_MAX + 1];
529 char ioerrlog[PATH_MAX + 1];
530 char klinelog[PATH_MAX + 1];
531 char killlog[PATH_MAX + 1];
532 char operspylog[PATH_MAX + 1];
533 char failed_operlog[PATH_MAX + 1];
534 };
535
536 extern unsigned int scount;
537 extern int ypass;
538 extern dlink_list class_items;
539 extern dlink_list server_items;
540 extern dlink_list cluster_items;
541 extern dlink_list hub_items;
542 extern dlink_list leaf_items;
543 extern struct logging_entry ConfigLoggingEntry;
544 extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
545 extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
546 extern struct config_server_hide ConfigServerHide; /* defined in s_conf.c */
547 extern struct server_info ServerInfo; /* defined in ircd.c */
548 extern struct admin_info AdminInfo; /* defined in ircd.c */
549
550 /* End GLOBAL section */
551
552 extern unsigned long get_sendq(struct Client *);
553 extern const char *get_client_className(struct Client *);
554 extern int get_client_ping(struct Client *, int *);
555 extern void check_class(void);
556 extern void init_class(void);
557 extern struct ConfItem *find_class(const char *);
558 extern void init_ip_hash_table(void);
559 extern void count_ip_hash(int *, unsigned long *);
560 extern void remove_one_ip(struct irc_ssaddr *);
561 extern struct ConfItem *make_conf_item(ConfType type);
562 extern void free_access_item(struct AccessItem *);
563 extern void read_conf_files(int);
564 extern int attach_connect_block(struct Client *, const char *, const char *);
565 extern int attach_server_conf(struct Client *, struct ConfItem *);
566 extern int attach_leaf_hub(struct Client *, struct ConfItem *);
567 extern int detach_conf(struct Client *, ConfType);
568
569 extern int conf_connect_allowed(struct irc_ssaddr *, int);
570 extern char *oper_privs_as_string(const unsigned int);
571 extern void split_nuh(char *mask, char **nick, char **user, char **host);
572 extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
573 const char *, const char *, int);
574 extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
575 const char *, const char *);
576 extern void delete_conf_item(struct ConfItem *);
577 extern void report_confitem_types(struct Client *, ConfType, int);
578 extern void yyerror(const char *);
579 extern int conf_yy_fatal_error(const char *);
580 extern int conf_fbgets(char *, unsigned int, FBFILE *);
581 extern void write_conf_line(struct Client *, struct ConfItem *,
582 const char *, time_t);
583 extern int remove_conf_line(ConfType, struct Client *, const char *,
584 const char *);
585
586 extern const char *get_conf_name(ConfType);
587 extern int rehash(int);
588 extern int conf_add_server(struct ConfItem *, unsigned int, const char *);
589 extern void conf_add_class_to_conf(struct ConfItem *, const char *);
590 extern void conf_add_d_conf(struct AccessItem *);
591
592 /* XXX consider moving these into csvlib.h */
593 extern void parse_csv_file(FBFILE *, ConfType);
594
595 extern char *get_oper_name(const struct Client *);
596
597 extern void *map_to_conf(struct ConfItem *);
598 extern struct ConfItem *unmap_conf_item(void *);
599 extern int yylex(void);
600
601 extern int match_conf_password(const char *, const struct AccessItem *);
602
603 #define NOT_AUTHORIZED (-1)
604 #define IRCD_SOCKET_ERROR (-2)
605 #define I_LINE_FULL (-3)
606 #define TOO_MANY (-4)
607 #define BANNED_CLIENT (-5)
608 #define TOO_FAST (-6)
609
610 extern void rebuild_cidr_class(struct ClassItem *, struct ClassItem *);
611
612 #endif /* INCLUDED_s_conf_h */

Properties

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