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 1324 by michael, Fri Mar 30 21:40:38 2012 UTC vs.
Revision 1518 by michael, Sun Sep 2 16:50:40 2012 UTC

# Line 28 | Line 28
28   #ifdef HAVE_LIBCRYPTO
29   #include <openssl/rsa.h>
30   #endif
31 – #include "fileio.h"             /* FBFILE */
31   #include "ircd_defs.h"
32   #include "motd.h"               /* MessageFile */
33   #include "client.h"
34   #include "hook.h"
35  
36  
38 – #define CONF_SERVER_INFO_TLS_VERSION_SSLV3 0x1
39 – #define CONF_SERVER_INFO_TLS_VERSION_TLSV1 0x2
40 –
37   struct Client;
38  
39   extern struct Callback *client_check_cb;
# Line 46 | Line 42 | struct conf_parser_context
42   {
43    unsigned int boot;
44    unsigned int pass;
45 <  FBFILE *conf_file;
45 >  FILE *conf_file;
46   };
47  
48   extern struct conf_parser_context conf_parser_ctx;
# Line 71 | Line 67 | typedef enum
67    GLINE_TYPE,
68    CRESV_TYPE,    
69    NRESV_TYPE,
74 –  GDENY_TYPE,
70    SERVICE_TYPE
71   } ConfType;
72  
# Line 127 | Line 122 | struct AccessItem
122    int              clients;  /* Number of *LOCAL* clients using this */
123    int              bits;
124    int              type;
125 <  struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
126 <  struct irc_ssaddr ipnum;      /* ip to connect to */
125 >  struct irc_ssaddr bind;  /* ip to bind to for outgoing connect */
126 >  struct irc_ssaddr addr;  /* ip to connect to */
127    char *           host;     /* host part of user@host */
128    char *           passwd;
129    char *           spasswd;  /* Password to send. */
# Line 146 | Line 141 | struct AccessItem
141   #endif
142    void *regexuser;
143    void *regexhost;
144 +  dlink_list leaf_list;
145 +  dlink_list hub_list;
146   };
147  
148   struct ClassItem
# Line 153 | Line 150 | struct ClassItem
150    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 +  unsigned int max_recvq;
154    int con_freq;
155    int ping_freq;
156    int ping_warning;
# Line 175 | Line 173 | struct CidrItem
173    int number_on_this_cidr;
174   };
175  
178 – #define ConFreq(x)      ((x)->con_freq)
179 – #define PingFreq(x)     ((x)->ping_freq)
180 – #define PingWarning(x)  ((x)->ping_warning)
181 – #define MaxTotal(x)     ((x)->max_total)
182 – #define MaxGlobal(x)    ((x)->max_global)
183 – #define MaxLocal(x)     ((x)->max_local)
184 – #define MaxIdent(x)     ((x)->max_ident)
185 – #define MaxPerIp(x)     ((x)->max_perip)
186 – #define MaxSendq(x)     ((x)->max_sendq)
187 – #define CurrUserCount(x) ((x)->curr_user_count)
188 – #define CidrBitlenIPV4(x)       ((x)->cidr_bitlen_ipv4)
189 – #define CidrBitlenIPV6(x)       ((x)->cidr_bitlen_ipv6)
190 – #define NumberPerCidr(x) ((x)->number_per_cidr)
191 –
192 – #define ClassPtr(x)      ((x)->class_ptr)
193 –
176  
177   #define CONF_ILLEGAL            0x80000000
178   #define CONF_RESERVED           0x00000001
179   #define CONF_CLIENT             0x00000002
180   #define CONF_SERVER             0x00000004
181   #define CONF_OPERATOR           0x00000008
182 < #define CONF_KILL               0x00000010
201 < #define CONF_KLINE              CONF_KILL
182 > #define CONF_KLINE              0x00000010
183   #define CONF_CLASS              0x00000020
184 < #define CONF_LEAF               0x00000040
185 < #define CONF_LISTEN_PORT        0x00000080
186 < #define CONF_HUB                0x00000100
187 < #define CONF_EXEMPTKLINE        0x00000200
188 < #define CONF_NOLIMIT            0x00000400
189 < #define CONF_DLINE              0x00000800
209 < #define CONF_XLINE              0x00001000
210 < #define CONF_ULINE              0x00002000
211 < #define CONF_EXEMPTDLINE        0x00004000
212 < #define CONF_GLINE              0x00008000
213 < #define CONF_SERVICE            0x00010000
184 > #define CONF_DLINE              0x00000040
185 > #define CONF_XLINE              0x00000080
186 > #define CONF_ULINE              0x00000100
187 > #define CONF_EXEMPTDLINE        0x00000200
188 > #define CONF_GLINE              0x00000400
189 > #define CONF_SERVICE            0x00000800
190  
191   #define CONF_SERVER_MASK       CONF_SERVER
192   #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
# Line 224 | Line 200 | struct CidrItem
200   #define IsConfServer(x)         ((x)->status == CONF_SERVER)
201   #define SetConfServer(x)        ((x)->status = CONF_SERVER)
202   #define IsConfOperator(x)       ((x)->status & CONF_OPERATOR)
203 < #define IsConfHub(x)            ((x)->status == CONF_HUB)
228 < #define SetConfHub(x)           ((x)->status = CONF_HUB)
229 < #define IsConfLeaf(x)           ((x)->status == CONF_LEAF)
230 < #define SetConfLeaf(x)          ((x)->status = CONF_LEAF)
231 < #define IsConfHubOrLeaf(x)      ((x)->status & (CONF_HUB|CONF_LEAF))
232 < #define IsConfKill(x)           ((x)->status == CONF_KILL)
203 > #define IsConfKill(x)           ((x)->status == CONF_KLINE)
204   #define IsConfClient(x)         ((x)->status & CONF_CLIENT)
234 – #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)
# Line 244 | Line 214 | struct CidrItem
214   #define CONF_FLAGS_LIMIT_IP             0x00000002
215   #define CONF_FLAGS_NO_TILDE             0x00000004
216   #define CONF_FLAGS_NEED_IDENTD          0x00000008
217 < /*                                      0x00000010 */
218 < #define CONF_FLAGS_NOMATCH_IP           0x00000020
219 < #define CONF_FLAGS_EXEMPTKLINE          0x00000040
220 < #define CONF_FLAGS_NOLIMIT              0x00000080
221 < /*                                      0x00000100 */
222 < #define CONF_FLAGS_SPOOF_IP             0x00000200
223 < #define CONF_FLAGS_SPOOF_NOTICE         0x00000400
224 < #define CONF_FLAGS_REDIR                0x00000800
225 < #define CONF_FLAGS_EXEMPTGLINE          0x00001000
256 < /*                                      0x00002000 */
257 < #define CONF_FLAGS_CAN_FLOOD            0x00100000
258 < #define CONF_FLAGS_NEED_PASSWORD        0x00200000
217 > #define CONF_FLAGS_NOMATCH_IP           0x00000010
218 > #define CONF_FLAGS_EXEMPTKLINE          0x00000020
219 > #define CONF_FLAGS_NOLIMIT              0x00000040
220 > #define CONF_FLAGS_SPOOF_IP             0x00000080
221 > #define CONF_FLAGS_SPOOF_NOTICE         0x00000100
222 > #define CONF_FLAGS_REDIR                0x00000200
223 > #define CONF_FLAGS_EXEMPTGLINE          0x00000400
224 > #define CONF_FLAGS_CAN_FLOOD            0x00000800
225 > #define CONF_FLAGS_NEED_PASSWORD        0x00001000
226   /* server flags */
227 < #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00004000
228 < /*                                      0x00008000 */
229 < #define CONF_FLAGS_ENCRYPTED            0x00010000
230 < #define CONF_FLAGS_UNUSED1___           0x00020000
231 < #define CONF_FLAGS_TEMPORARY            0x00040000
232 < #define CONF_FLAGS_UNUSED2___           0x00080000
233 < #define CONF_FLAGS_BURST_AWAY           0x00400000
267 < #define CONF_FLAGS_EXEMPTRESV           0x00800000
268 < #define CONF_FLAGS_TOPICBURST           0x01000000
269 < #define CONF_FLAGS_SSL                  0x02000000
227 > #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00002000
228 > #define CONF_FLAGS_ENCRYPTED            0x00004000
229 > #define CONF_FLAGS_TEMPORARY            0x00008000
230 > #define CONF_FLAGS_BURST_AWAY           0x00010000
231 > #define CONF_FLAGS_EXEMPTRESV           0x00020000
232 > #define CONF_FLAGS_TOPICBURST           0x00040000
233 > #define CONF_FLAGS_SSL                  0x00080000
234  
235   /* Macros for struct AccessItem */
236   #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
# Line 318 | Line 282 | struct CidrItem
282                                   SHARED_RESV | SHARED_UNRESV |\
283                                   SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
284  
321 – /* gline acl entry actions */
322 – #define GDENY_BLOCK             0x1
323 – #define GDENY_REJECT            0x2
324 –
285   struct config_file_entry
286   {
287    const char *dpath;          /* DPATH if set from command line */
288    const char *configfile;
289    const char *klinefile;
290    const char *xlinefile;
331 –  const char *rxlinefile;
332 –  const char *rklinefile;
291    const char *dlinefile;
334 –  const char *glinefile;
292    const char *cresvfile;
293    const char *nresvfile;
294  
338 –  char *logpath;
339 –  char *operlog;
295    char *egdpool_path;
296    char *service_name;
297  
298    MessageFile motd;
344 –  MessageFile opermotd;
299    MessageFile linksfile;
300  
301    int gline_min_cidr;
# Line 379 | Line 333 | struct config_file_entry
333    int pace_wait;
334    int pace_wait_simple;
335    int gline_time;
336 <  int gline_logging;
336 >  int gline_request_time;
337    int oper_only_umodes;
338    int oper_umodes;
339    int max_targets;
# Line 388 | Line 342 | struct config_file_entry
342    int min_nonwildcard_simple;
343    int kill_chase_time_limit;
344    int default_floodcount;
391 –  int client_flood;
345    /* 0 == don't use throttle... */
346    int throttle_time;
347    int use_egd;
# Line 401 | Line 354 | struct config_channel_entry
354   {
355    int disable_fake_channels;
356    int restrict_channels;
404 –  int disable_local_channels;
405 –  int use_except;
406 –  int use_invex;
407 –  int use_knock;
357    int knock_delay;
358    int knock_delay_channel;
359    unsigned int max_bans;
360    unsigned int max_chans_per_user;
361 +  unsigned int max_chans_per_oper;
362    int no_create_on_split;
363    int no_join_on_split;
364    int quiet_on_ban;
415 –  int burst_topicwho;
365    int default_split_server_count;
366    int default_split_user_count;
367   };
# Line 425 | Line 374 | struct config_server_hide
374    int links_delay;
375    int links_disabled;
376    int hidden;
428 –  int disable_hidden;
377    int hide_server_ips;
378   };
379  
# Line 464 | Line 412 | struct logging_entry
412    unsigned int use_logging;
413   };
414  
467 – extern dlink_list gdeny_items;
415   extern dlink_list class_items;
416   extern dlink_list server_items;
417   extern dlink_list cluster_items;
# Line 473 | Line 420 | extern dlink_list rxconf_items;
420   extern dlink_list rkconf_items;
421   extern dlink_list leaf_items;
422   extern dlink_list service_items;
476 – extern dlink_list temporary_klines;
477 – extern dlink_list temporary_dlines;
478 – extern dlink_list temporary_glines;
423   extern dlink_list temporary_xlines;
480 – extern dlink_list temporary_rxlines;
481 – extern dlink_list temporary_rklines;
424   extern struct logging_entry ConfigLoggingEntry;
425   extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
426   extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
# Line 489 | Line 431 | extern int valid_wild_card(struct Client
431   /* End GLOBAL section */
432  
433   extern unsigned int get_sendq(struct Client *);
434 + extern unsigned int get_recvq(struct Client *);
435   extern const char *get_client_class(struct Client *);
436   extern int get_client_ping(struct Client *, int *);
437   extern void check_class(void);
# Line 517 | Line 460 | extern struct ConfItem *find_matching_na
460   extern struct ConfItem *find_exact_name_conf(ConfType, const struct Client *, const char *,
461                                               const char *, const char *);
462   extern void delete_conf_item(struct ConfItem *);
463 < extern void report_confitem_types(struct Client *, ConfType, int);
463 > extern void report_confitem_types(struct Client *, ConfType);
464   extern void yyerror(const char *);
522 – extern int conf_yy_fatal_error(const char *);
523 – extern int conf_fbgets(char *, unsigned int, FBFILE *);
465   extern void write_conf_line(struct Client *, struct ConfItem *,
466                              const char *, time_t);
467   extern int remove_conf_line(ConfType, struct Client *, const char *,
# Line 533 | Line 474 | extern int conf_add_server(struct ConfIt
474   extern void conf_add_class_to_conf(struct ConfItem *, const char *);
475  
476   /* XXX consider moving these into csvlib.h */
477 < extern void parse_csv_file(FBFILE *, ConfType);
478 <
479 < extern char *get_oper_name(const struct Client *);
477 > extern void parse_csv_file(FILE *, ConfType);
478 > extern int find_and_delete_temporary(const char *, const char *, int);
479 > extern const char *get_oper_name(const struct Client *);
480  
481   extern void *map_to_conf(struct ConfItem *);
482   extern struct ConfItem *unmap_conf_item(void *);
483   /* XXX should the parse_aline stuff go into another file ?? */
484   #define AWILD 0x1               /* check wild cards */
544 – #define NOUSERLOOKUP 0x2 /* Don't lookup the user@host on /rkline nick */
485   extern int parse_aline(const char *, struct Client *, int, char **,
486                         int, char **, char **, time_t *, char **, char **);
487   extern int valid_comment(struct Client *, char *, int);
# Line 563 | Line 503 | extern int match_conf_password(const cha
503   extern void cluster_a_line(struct Client *,
504                             const char *, int, int, const char *,...);
505   extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
566 –
567 – /* XXX **/
568 – //extern int yylex(void);
569 –
506   #endif /* INCLUDED_s_conf_h */

Diff Legend

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