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/include/s_conf.h (file contents), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid-8/include/s_conf.h (file contents), Revision 1157 by michael, Tue Aug 9 22:03:59 2011 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 33 | Line 33
33   #include "motd.h"               /* MessageFile */
34   #include "client.h"
35   #include "hook.h"
36 < #include "pcre.h"
36 >
37 >
38 > #define CONF_SERVER_INFO_TLS_VERSION_SSLV3 0x1
39 > #define CONF_SERVER_INFO_TLS_VERSION_TLSV1 0x2
40  
41   struct Client;
39 – struct DNSReply;
40 – struct hostent;
42  
42 – extern FBFILE *conf_fbfile_in;
43   extern struct Callback *client_check_cb;
44  
45 < typedef enum {  
45 > struct conf_parser_context
46 > {
47 >  unsigned int boot;
48 >  unsigned int pass;
49 >  FBFILE *conf_file;
50 > };
51 >
52 > extern struct conf_parser_context conf_parser_ctx;
53 >
54 > typedef enum
55 > {  
56    CONF_TYPE,
57    CLASS_TYPE,
58    OPER_TYPE,
# Line 61 | Line 71 | typedef enum {
71    GLINE_TYPE,
72    CRESV_TYPE,    
73    NRESV_TYPE,
74 <  GDENY_TYPE
74 >  GDENY_TYPE,
75 >  SERVICE_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 +  dlink_node node;      /* link into known ConfItems of this type */
95 +
96    char *name;           /* Primary key */
97 <  pcre *regexpname;
71 <  dlink_node node;      /* link into known ConfItems of this type */
97 >  void *regexpname;
98    unsigned int flags;
99    ConfType type;
100   };
# Line 92 | Line 118 | struct MatchItem
118   struct AccessItem
119   {
120    dlink_node node;
121 +  unsigned int     dns_failed;
122 +  unsigned int     dns_pending;
123    unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
124    unsigned int     flags;
125 +  unsigned int     modes;
126 +  unsigned int     port;
127    int              clients;  /* Number of *LOCAL* clients using this */
128    struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
129    struct irc_ssaddr ipnum;      /* ip to connect to */
# Line 103 | Line 133 | struct AccessItem
133    char *           reason;
134    char *           oper_reason;
135    char *           user;     /* user part of user@host */
106 –  int              port;
107 –  char *           fakename;   /* Mask name */
136    time_t           hold;     /* Hold action until this time (calendar time) */
137    struct ConfItem *class_ptr;  /* Class of connection */
110 –  struct DNSQuery* dns_query;
138    int              aftype;
139   #ifdef HAVE_LIBCRYPTO
140    char *           rsa_public_key_file;
141    RSA *            rsa_public_key;
142    struct EncCapability *cipher_preference;
143   #endif
144 <  pcre *regexuser;
145 <  pcre *regexhost;
144 >  void *regexuser;
145 >  void *regexhost;
146   };
147  
148   struct ClassItem
149   {
150 <  long max_sendq;
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    int con_freq;
154    int ping_freq;
155    int ping_warning;
# Line 133 | Line 162 | struct ClassItem
162    int cidr_bitlen_ipv4;
163    int cidr_bitlen_ipv6;
164    int number_per_cidr;
165 <  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
137 <  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
165 >  int active;
166   };
167  
168   struct CidrItem
169   {
170 +  dlink_node node;
171    struct irc_ssaddr mask;
172    int number_on_this_cidr;
144 –  dlink_node node;
173   };
174  
175   #define ConFreq(x)      ((x)->con_freq)
# Line 179 | Line 207 | struct CidrItem
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)
# Line 260 | Line 289 | struct CidrItem
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)
263 – #define IsConfLazyLink(x)       ((x)->flags & CONF_FLAGS_LAZY_LINK)
264 – #define SetConfLazyLink(x)      ((x)->flags = CONF_FLAGS_LAZY_LINK)
265 – #define ClearConfLazyLink(x)    ((x)->flags &= ~CONF_FLAGS_LAZY_LINK)
292   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
293   #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
294   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
# Line 316 | Line 342 | struct config_file_entry
342  
343    char *servlink_path;
344    char *egdpool_path;
345 +  char *service_name;
346  
347    MessageFile motd;
348    MessageFile opermotd;
# Line 324 | Line 351 | struct config_file_entry
351    unsigned char compression_level;
352    int gline_min_cidr;
353    int gline_min_cidr6;
327 –  int dot_in_ip6_addr;
354    int dots_in_ident;
355    int failed_oper_notice;
356    int anti_spam_exit_message_time;
357 <  int max_accept;
357 >  unsigned int max_accept;
358 >  unsigned int max_watch;
359    int max_nick_time;
360 <  int max_nick_changes;
360 >  unsigned int max_nick_changes;
361    int ts_max_delta;
362    int ts_warn_delta;
363    int anti_nick_flood;
364    int kline_with_reason;
365    int warn_no_nline;
366    int invisible_on_connect;
367 +  int stats_e_disabled;
368    int stats_o_oper_only;
369    int stats_k_oper_only;
370    int stats_i_oper_only;
# Line 380 | Line 408 | struct config_file_entry
408  
409   struct config_channel_entry
410   {
411 +  int disable_fake_channels;
412    int restrict_channels;
413    int disable_local_channels;
414    int use_except;
# Line 387 | Line 416 | struct config_channel_entry
416    int use_knock;
417    int knock_delay;
418    int knock_delay_channel;
390 –  int invite_ops_only;
419    unsigned int max_bans;
420    unsigned int max_chans_per_user;
421    int no_create_on_split;
# Line 400 | Line 428 | struct config_channel_entry
428  
429   struct config_server_hide
430   {
431 +  char *hidden_name;
432    int flatten_links;
433    int hide_servers;
405 –  char *hidden_name;
434    int links_delay;
435    int links_disabled;
436    int hidden;
# Line 412 | Line 440 | struct config_server_hide
440  
441   struct server_info
442   {
443 +  char *sid;
444    char *name;
445    char *description;
446    char *network_name;
# Line 419 | Line 448 | struct server_info
448   #ifdef HAVE_LIBCRYPTO
449    char *rsa_private_key_file;
450    RSA *rsa_private_key;
451 <  SSL_CTX *ctx;
451 >  SSL_CTX *server_ctx;
452 >  SSL_CTX *client_ctx;
453 >  unsigned int tls_version;
454   #endif
424 –  char *sid;
455    int hub;
456    struct irc_ssaddr ip;
457    struct irc_ssaddr ip6;
458 <  int max_clients;
458 >  unsigned int max_clients;
459    int specific_ipv4_vhost;
460    int specific_ipv6_vhost;
461    struct sockaddr_in dns_host;
# Line 452 | Line 482 | struct logging_entry
482    char failed_operlog[PATH_MAX + 1];
483   };
484  
485 < extern unsigned int scount;
456 < extern int ypass;
485 > extern dlink_list gdeny_items;
486   extern dlink_list class_items;
487   extern dlink_list server_items;
488   extern dlink_list cluster_items;
# Line 461 | Line 490 | extern dlink_list hub_items;
490   extern dlink_list rxconf_items;
491   extern dlink_list rkconf_items;
492   extern dlink_list leaf_items;
493 + extern dlink_list service_items;
494   extern dlink_list temporary_klines;
495   extern dlink_list temporary_dlines;
496   extern dlink_list temporary_glines;
# Line 476 | Line 506 | extern struct admin_info AdminInfo;
506   extern int valid_wild_card(struct Client *, int, int, ...);
507   /* End GLOBAL section */
508  
509 < extern unsigned long get_sendq(struct Client *);
509 > extern unsigned int get_sendq(struct Client *);
510   extern const char *get_client_class(struct Client *);
511   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 *);
515   extern void init_ip_hash_table(void);
516 < extern void count_ip_hash(int *, unsigned long *);
516 > extern void count_ip_hash(unsigned int *, uint64_t *);
517   extern void remove_one_ip(struct irc_ssaddr *);
518   extern struct ConfItem *make_conf_item(ConfType type);
519   extern void free_access_item(struct AccessItem *);
# Line 499 | Line 529 | extern struct AccessItem *find_kill(stru
529   extern struct AccessItem *find_gline(struct Client *);
530   extern int conf_connect_allowed(struct irc_ssaddr *, int);
531   extern char *oper_privs_as_string(const unsigned int);
532 < extern void split_nuh(char *mask, char **nick, char **user, char **host);
532 > extern void split_nuh(struct split_nuh_item *);
533   extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
534                                                  const char *, const char *, int);
535   extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
# Line 517 | Line 547 | extern void add_temp_line(struct ConfIte
547   extern void cleanup_tklines(void *);
548   extern const char *get_conf_name(ConfType);
549   extern int rehash(int);
550 < extern int conf_add_server(struct ConfItem *, unsigned int, const char *);
550 > extern int conf_add_server(struct ConfItem *, const char *);
551   extern void conf_add_class_to_conf(struct ConfItem *, const char *);
522 – extern void conf_add_d_conf(struct AccessItem *);
552  
553   /* XXX consider moving these into csvlib.h */
554   extern void parse_csv_file(FBFILE *, ConfType);
# Line 535 | Line 564 | extern int parse_aline(const char *, str
564                         int, char **, char **, time_t *, char **, char **);
565   extern int valid_comment(struct Client *, char *, int);
566  
538 – /* XXX */
539 – extern int yylex(void);
567  
568   #define TK_SECONDS 0
569   #define TK_MINUTES 1
570 < extern time_t valid_tkline(char *, int);
570 > extern time_t valid_tkline(const char *, int);
571   extern int match_conf_password(const char *, const struct AccessItem *);
572  
573   #define NOT_AUTHORIZED    (-1)
574 < #define IRCD_SOCKET_ERROR (-2)
575 < #define I_LINE_FULL       (-3)
576 < #define TOO_MANY          (-4)
577 < #define BANNED_CLIENT     (-5)
551 < #define TOO_FAST          (-6)
574 > #define I_LINE_FULL       (-2)
575 > #define TOO_MANY          (-3)
576 > #define BANNED_CLIENT     (-4)
577 > #define TOO_FAST          (-5)
578  
579   #define CLEANUP_TKLINES_TIME 60
580  
# Line 556 | Line 582 | extern void cluster_a_line(struct Client
582                             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 +
588   #endif /* INCLUDED_s_conf_h */

Comparing:
ircd-hybrid/include/s_conf.h (property svn:keywords), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid-8/include/s_conf.h (property svn:keywords), Revision 1157 by michael, Tue Aug 9 22:03:59 2011 UTC

# Line 1 | Line 1
1 < "Id Revision"
1 > Id Revision

Diff Legend

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