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.
Revision 1008 by michael, Sun Sep 13 13:56:11 2009 UTC

# Line 24 | Line 24
24  
25   #ifndef INCLUDED_s_conf_h
26   #define INCLUDED_s_conf_h
27 < #include "setup.h"
27 > #include "config.h"
28   #ifdef HAVE_LIBCRYPTO
29   #include <openssl/rsa.h>
30   #endif
# Line 35 | Line 35
35   #include "hook.h"
36   #include "pcre.h"
37  
38 +
39 + #define CONF_SERVER_INFO_TLS_VERSION_SSLV3 0x1
40 + #define CONF_SERVER_INFO_TLS_VERSION_TLSV1 0x2
41 +
42   struct Client;
39 – struct DNSReply;
40 – struct hostent;
43  
42 – extern FBFILE *conf_fbfile_in;
44   extern struct Callback *client_check_cb;
45  
46 + struct conf_parser_context
47 + {
48 +  unsigned int boot;
49 +  unsigned int pass;
50 +  FBFILE *conf_file;
51 + };
52 +
53 + extern struct conf_parser_context conf_parser_ctx;
54 +
55   typedef enum
56   {  
57    CONF_TYPE,
# Line 65 | Line 75 | typedef enum
75    GDENY_TYPE
76   } ConfType;
77  
78 + struct split_nuh_item
79 + {
80 +  dlink_node node;
81 +
82 +  char *nuhmask;
83 +  char *nickptr;
84 +  char *userptr;
85 +  char *hostptr;
86 +
87 +  size_t nicksize;
88 +  size_t usersize;
89 +  size_t hostsize;
90 + };
91 +
92   struct ConfItem
93   {
94    char *name;           /* Primary key */
# Line 93 | Line 117 | struct MatchItem
117   struct AccessItem
118   {
119    dlink_node node;
120 +  unsigned int     dns_failed;
121 +  unsigned int     dns_pending;
122    unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
123    unsigned int     flags;
124    unsigned int     modes;
# Line 109 | Line 135 | struct AccessItem
135    char *           fakename;   /* Mask name */
136    time_t           hold;     /* Hold action until this time (calendar time) */
137    struct ConfItem *class_ptr;  /* Class of connection */
112 –  struct DNSQuery* dns_query;
138    int              aftype;
139   #ifdef HAVE_LIBCRYPTO
140    char *           rsa_public_key_file;
# Line 122 | Line 147 | struct AccessItem
147  
148   struct ClassItem
149   {
150 <  long max_sendq;
150 >  unsigned int max_sendq;
151    int con_freq;
152    int ping_freq;
153    int ping_warning;
# Line 137 | Line 162 | struct ClassItem
162    int number_per_cidr;
163    dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
164    dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
165 +  int active;
166   };
167  
168   struct CidrItem
# Line 262 | Line 288 | struct CidrItem
288   #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
289   #define SetConfCryptLink(x)     ((x)->flags |= CONF_FLAGS_CRYPTLINK)
290   #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)
291   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
292   #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
293   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
# Line 330 | Line 353 | struct config_file_entry
353    int dots_in_ident;
354    int failed_oper_notice;
355    int anti_spam_exit_message_time;
356 <  int max_accept;
356 >  unsigned int max_accept;
357 >  unsigned int max_watch;
358    int max_nick_time;
359 <  int max_nick_changes;
359 >  unsigned int max_nick_changes;
360    int ts_max_delta;
361    int ts_warn_delta;
362    int anti_nick_flood;
363    int kline_with_reason;
364    int warn_no_nline;
365    int invisible_on_connect;
366 +  int stats_e_disabled;
367    int stats_o_oper_only;
368    int stats_k_oper_only;
369    int stats_i_oper_only;
# Line 382 | Line 407 | struct config_file_entry
407  
408   struct config_channel_entry
409   {
410 +  int disable_fake_channels;
411    int restrict_channels;
412    int disable_local_channels;
413    int use_except;
# Line 389 | Line 415 | struct config_channel_entry
415    int use_knock;
416    int knock_delay;
417    int knock_delay_channel;
392 –  int invite_ops_only;
418    unsigned int max_bans;
419    unsigned int max_chans_per_user;
420    int no_create_on_split;
# Line 421 | Line 446 | struct server_info
446   #ifdef HAVE_LIBCRYPTO
447    char *rsa_private_key_file;
448    RSA *rsa_private_key;
449 <  SSL_CTX *ctx;
449 >  SSL_CTX *server_ctx;
450 >  SSL_CTX *client_ctx;
451 >  unsigned int tls_version;
452   #endif
453    char *sid;
454    int hub;
# Line 454 | Line 481 | struct logging_entry
481    char failed_operlog[PATH_MAX + 1];
482   };
483  
484 < extern unsigned int scount;
458 < extern int ypass;
484 > extern dlink_list gdeny_items;
485   extern dlink_list class_items;
486   extern dlink_list server_items;
487   extern dlink_list cluster_items;
# Line 478 | Line 504 | extern struct admin_info AdminInfo;
504   extern int valid_wild_card(struct Client *, int, int, ...);
505   /* End GLOBAL section */
506  
507 < extern unsigned long get_sendq(struct Client *);
507 > extern unsigned int get_sendq(struct Client *);
508   extern const char *get_client_class(struct Client *);
509   extern int get_client_ping(struct Client *, int *);
510   extern void check_class(void);
511   extern void init_class(void);
512   extern struct ConfItem *find_class(const char *);
513   extern void init_ip_hash_table(void);
514 < extern void count_ip_hash(int *, unsigned long *);
514 > extern void count_ip_hash(unsigned int *, uint64_t *);
515   extern void remove_one_ip(struct irc_ssaddr *);
516   extern struct ConfItem *make_conf_item(ConfType type);
517   extern void free_access_item(struct AccessItem *);
# Line 501 | Line 527 | extern struct AccessItem *find_kill(stru
527   extern struct AccessItem *find_gline(struct Client *);
528   extern int conf_connect_allowed(struct irc_ssaddr *, int);
529   extern char *oper_privs_as_string(const unsigned int);
530 < extern void split_nuh(char *mask, char **nick, char **user, char **host);
530 > extern void split_nuh(struct split_nuh_item *);
531   extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
532                                                  const char *, const char *, int);
533   extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
# Line 519 | Line 545 | extern void add_temp_line(struct ConfIte
545   extern void cleanup_tklines(void *);
546   extern const char *get_conf_name(ConfType);
547   extern int rehash(int);
548 < extern int conf_add_server(struct ConfItem *, unsigned int, const char *);
548 > extern int conf_add_server(struct ConfItem *, const char *);
549   extern void conf_add_class_to_conf(struct ConfItem *, const char *);
524 – extern void conf_add_d_conf(struct AccessItem *);
550  
551   /* XXX consider moving these into csvlib.h */
552   extern void parse_csv_file(FBFILE *, ConfType);
# Line 537 | Line 562 | extern int parse_aline(const char *, str
562                         int, char **, char **, time_t *, char **, char **);
563   extern int valid_comment(struct Client *, char *, int);
564  
540 – /* XXX */
541 – extern int yylex(void);
565  
566   #define TK_SECONDS 0
567   #define TK_MINUTES 1
# Line 546 | Line 569 | extern time_t valid_tkline(char *, int);
569   extern int match_conf_password(const char *, const struct AccessItem *);
570  
571   #define NOT_AUTHORIZED    (-1)
572 < #define IRCD_SOCKET_ERROR (-2)
573 < #define I_LINE_FULL       (-3)
574 < #define TOO_MANY          (-4)
575 < #define BANNED_CLIENT     (-5)
553 < #define TOO_FAST          (-6)
572 > #define I_LINE_FULL       (-2)
573 > #define TOO_MANY          (-3)
574 > #define BANNED_CLIENT     (-4)
575 > #define TOO_FAST          (-5)
576  
577   #define CLEANUP_TKLINES_TIME 60
578  
# Line 558 | Line 580 | extern void cluster_a_line(struct Client
580                             const char *, int, int, const char *,...);
581   extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
582  
583 + /* XXX **/
584 + extern int yylex(void);
585 +
586   #endif /* INCLUDED_s_conf_h */

Diff Legend

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