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.
ircd-hybrid-8/include/s_conf.h (file contents), Revision 1247 by michael, Sat Oct 1 07:54:24 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 + 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,
# Line 62 | 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;
72 <  dlink_node node;      /* link into known ConfItems of this type */
97 >  void *regexpname;
98    unsigned int flags;
99    ConfType type;
100   };
# Line 93 | 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 105 | Line 133 | struct AccessItem
133    char *           reason;
134    char *           oper_reason;
135    char *           user;     /* user part of user@host */
108 –  int              port;
109 –  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;
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 135 | 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 */
139 <  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;
146 –  dlink_node node;
173   };
174  
175   #define ConFreq(x)      ((x)->con_freq)
# Line 181 | 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 218 | Line 245 | struct CidrItem
245   #define CONF_FLAGS_NOMATCH_IP           0x00000020
246   #define CONF_FLAGS_EXEMPTKLINE          0x00000040
247   #define CONF_FLAGS_NOLIMIT              0x00000080
248 < #define CONF_FLAGS_IDLE_LINED           0x00000100
248 > /*                                      0x00000100 */
249   #define CONF_FLAGS_SPOOF_IP             0x00000200
250   #define CONF_FLAGS_SPOOF_NOTICE         0x00000400
251   #define CONF_FLAGS_REDIR                0x00000800
252   #define CONF_FLAGS_EXEMPTGLINE          0x00001000
253 < #define CONF_FLAGS_RESTRICTED           0x00002000
253 > /*                                      0x00002000 */
254   #define CONF_FLAGS_CAN_FLOOD            0x00100000
255   #define CONF_FLAGS_NEED_PASSWORD        0x00200000
256   /* server flags */
257   #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00004000
258 < #define CONF_FLAGS_LAZY_LINK            0x00008000
258 > /*                                      0x00008000 */
259   #define CONF_FLAGS_ENCRYPTED            0x00010000
260   #define CONF_FLAGS_COMPRESSED           0x00020000
261   #define CONF_FLAGS_TEMPORARY            0x00040000
# Line 248 | Line 275 | struct CidrItem
275   #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
276   #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
277   #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
251 – #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
278   #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
279   #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
280   #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
255 – #define IsConfRestricted(x)     ((x)->flags & CONF_FLAGS_RESTRICTED)
281   #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
282   #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
283   #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
# Line 262 | Line 287 | struct CidrItem
287   #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
288   #define SetConfCryptLink(x)     ((x)->flags |= CONF_FLAGS_CRYPTLINK)
289   #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)
290   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
291   #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
292   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
# Line 318 | Line 340 | struct config_file_entry
340  
341    char *servlink_path;
342    char *egdpool_path;
343 +  char *service_name;
344  
345    MessageFile motd;
346    MessageFile opermotd;
# Line 326 | Line 349 | struct config_file_entry
349    unsigned char compression_level;
350    int gline_min_cidr;
351    int gline_min_cidr6;
329 –  int dot_in_ip6_addr;
352    int dots_in_ident;
353    int failed_oper_notice;
354    int anti_spam_exit_message_time;
355 <  int max_accept;
355 >  unsigned int max_accept;
356 >  unsigned int max_watch;
357    int max_nick_time;
358 <  int max_nick_changes;
358 >  unsigned int max_nick_changes;
359    int ts_max_delta;
360    int ts_warn_delta;
361    int anti_nick_flood;
362    int kline_with_reason;
363    int warn_no_nline;
364    int invisible_on_connect;
365 +  int stats_e_disabled;
366    int stats_o_oper_only;
367    int stats_k_oper_only;
368    int stats_i_oper_only;
# Line 359 | Line 383 | struct config_file_entry
383    int pace_wait_simple;
384    int gline_time;
385    int gline_logging;
362 –  int idletime;
386    int oper_only_umodes;
387    int oper_umodes;
388    int max_targets;
# Line 382 | Line 405 | struct config_file_entry
405  
406   struct config_channel_entry
407   {
408 +  int disable_fake_channels;
409    int restrict_channels;
410    int disable_local_channels;
411    int use_except;
# Line 389 | Line 413 | struct config_channel_entry
413    int use_knock;
414    int knock_delay;
415    int knock_delay_channel;
392 –  int invite_ops_only;
416    unsigned int max_bans;
417    unsigned int max_chans_per_user;
418    int no_create_on_split;
# Line 402 | Line 425 | struct config_channel_entry
425  
426   struct config_server_hide
427   {
428 +  char *hidden_name;
429    int flatten_links;
430    int hide_servers;
407 –  char *hidden_name;
431    int links_delay;
432    int links_disabled;
433    int hidden;
# Line 414 | Line 437 | struct config_server_hide
437  
438   struct server_info
439   {
440 +  char *sid;
441    char *name;
442    char *description;
443    char *network_name;
# Line 421 | Line 445 | struct server_info
445   #ifdef HAVE_LIBCRYPTO
446    char *rsa_private_key_file;
447    RSA *rsa_private_key;
448 <  SSL_CTX *ctx;
448 >  SSL_CTX *server_ctx;
449 >  SSL_CTX *client_ctx;
450 >  unsigned int tls_version;
451   #endif
426 –  char *sid;
452    int hub;
453    struct irc_ssaddr ip;
454    struct irc_ssaddr ip6;
455 <  int max_clients;
455 >  unsigned int max_clients;
456    int specific_ipv4_vhost;
457    int specific_ipv6_vhost;
458    struct sockaddr_in dns_host;
# Line 444 | Line 469 | struct admin_info
469   struct logging_entry
470   {
471    unsigned int use_logging;
472 <  char operlog[PATH_MAX + 1];
448 <  char userlog[PATH_MAX + 1];
449 <  char glinelog[PATH_MAX + 1];
450 <  char ioerrlog[PATH_MAX + 1];
451 <  char klinelog[PATH_MAX + 1];
452 <  char killlog[PATH_MAX + 1];
453 <  char operspylog[PATH_MAX + 1];
454 <  char failed_operlog[PATH_MAX + 1];
472 >  unsigned int timestamp;
473   };
474  
475 < extern unsigned int scount;
458 < extern int ypass;
475 > extern dlink_list gdeny_items;
476   extern dlink_list class_items;
477   extern dlink_list server_items;
478   extern dlink_list cluster_items;
# Line 463 | Line 480 | extern dlink_list hub_items;
480   extern dlink_list rxconf_items;
481   extern dlink_list rkconf_items;
482   extern dlink_list leaf_items;
483 + extern dlink_list service_items;
484   extern dlink_list temporary_klines;
485   extern dlink_list temporary_dlines;
486   extern dlink_list temporary_glines;
# Line 478 | Line 496 | extern struct admin_info AdminInfo;
496   extern int valid_wild_card(struct Client *, int, int, ...);
497   /* End GLOBAL section */
498  
499 < extern unsigned long get_sendq(struct Client *);
499 > extern unsigned int get_sendq(struct Client *);
500   extern const char *get_client_class(struct Client *);
501   extern int get_client_ping(struct Client *, int *);
502   extern void check_class(void);
503   extern void init_class(void);
504   extern struct ConfItem *find_class(const char *);
505   extern void init_ip_hash_table(void);
506 < extern void count_ip_hash(int *, unsigned long *);
506 > extern void count_ip_hash(unsigned int *, uint64_t *);
507   extern void remove_one_ip(struct irc_ssaddr *);
508   extern struct ConfItem *make_conf_item(ConfType type);
509   extern void free_access_item(struct AccessItem *);
# Line 501 | Line 519 | extern struct AccessItem *find_kill(stru
519   extern struct AccessItem *find_gline(struct Client *);
520   extern int conf_connect_allowed(struct irc_ssaddr *, int);
521   extern char *oper_privs_as_string(const unsigned int);
522 < extern void split_nuh(char *mask, char **nick, char **user, char **host);
522 > extern void split_nuh(struct split_nuh_item *);
523   extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
524                                                  const char *, const char *, int);
525   extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
# Line 519 | Line 537 | extern void add_temp_line(struct ConfIte
537   extern void cleanup_tklines(void *);
538   extern const char *get_conf_name(ConfType);
539   extern int rehash(int);
540 < extern int conf_add_server(struct ConfItem *, unsigned int, const char *);
540 > extern int conf_add_server(struct ConfItem *, const char *);
541   extern void conf_add_class_to_conf(struct ConfItem *, const char *);
524 – extern void conf_add_d_conf(struct AccessItem *);
542  
543   /* XXX consider moving these into csvlib.h */
544   extern void parse_csv_file(FBFILE *, ConfType);
# Line 537 | Line 554 | extern int parse_aline(const char *, str
554                         int, char **, char **, time_t *, char **, char **);
555   extern int valid_comment(struct Client *, char *, int);
556  
540 – /* XXX */
541 – extern int yylex(void);
557  
558   #define TK_SECONDS 0
559   #define TK_MINUTES 1
560 < extern time_t valid_tkline(char *, int);
560 > extern time_t valid_tkline(const char *, int);
561   extern int match_conf_password(const char *, const struct AccessItem *);
562  
563   #define NOT_AUTHORIZED    (-1)
564 < #define IRCD_SOCKET_ERROR (-2)
565 < #define I_LINE_FULL       (-3)
566 < #define TOO_MANY          (-4)
567 < #define BANNED_CLIENT     (-5)
553 < #define TOO_FAST          (-6)
564 > #define I_LINE_FULL       (-2)
565 > #define TOO_MANY          (-3)
566 > #define BANNED_CLIENT     (-4)
567 > #define TOO_FAST          (-5)
568  
569   #define CLEANUP_TKLINES_TIME 60
570  
# Line 558 | Line 572 | extern void cluster_a_line(struct Client
572                             const char *, int, int, const char *,...);
573   extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
574  
575 + /* XXX **/
576 + //extern int yylex(void);
577 +
578   #endif /* INCLUDED_s_conf_h */

Diff Legend

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