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 967 by michael, Sun Aug 2 18:05:28 2009 UTC vs.
ircd-hybrid-8/include/s_conf.h (file contents), Revision 1303 by michael, Fri Mar 23 10:52:19 2012 UTC

# 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;
43 – struct DNSReply;
44 – struct hostent;
42  
43   extern struct Callback *client_check_cb;
44  
# Line 74 | 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
# Line 93 | Line 91 | struct split_nuh_item
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;
98 <  dlink_node node;      /* link into known ConfItems of this type */
97 >  void *regexpname;
98    unsigned int flags;
99    ConfType type;
100   };
# Line 119 | 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 +  int              bits;
129 +  int              type;
130    struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
131    struct irc_ssaddr ipnum;      /* ip to connect to */
132    char *           host;     /* host part of user@host */
# Line 131 | Line 135 | struct AccessItem
135    char *           reason;
136    char *           oper_reason;
137    char *           user;     /* user part of user@host */
134 –  int              port;
135 –  char *           fakename;   /* Mask name */
138    time_t           hold;     /* Hold action until this time (calendar time) */
139    struct ConfItem *class_ptr;  /* Class of connection */
138 –  struct DNSQuery* dns_query;
140    int              aftype;
141   #ifdef HAVE_LIBCRYPTO
142 +  /* certs */
143    char *           rsa_public_key_file;
144    RSA *            rsa_public_key;
143 –  struct EncCapability *cipher_preference;
145   #endif
146 <  pcre *regexuser;
147 <  pcre *regexhost;
146 >  void *regexuser;
147 >  void *regexhost;
148   };
149  
150   struct ClassItem
151   {
152 +  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
153 +  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
154    unsigned int max_sendq;
155    int con_freq;
156    int ping_freq;
# Line 161 | Line 164 | struct ClassItem
164    int cidr_bitlen_ipv4;
165    int cidr_bitlen_ipv6;
166    int number_per_cidr;
164 –  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
165 –  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
167    int active;
168   };
169  
170   struct CidrItem
171   {
172 +  dlink_node node;
173    struct irc_ssaddr mask;
174    int number_on_this_cidr;
173 –  dlink_node node;
175   };
176  
177   #define ConFreq(x)      ((x)->con_freq)
# Line 208 | Line 209 | struct CidrItem
209   #define CONF_ULINE              0x00002000
210   #define CONF_EXEMPTDLINE        0x00004000
211   #define CONF_GLINE              0x00008000
212 + #define CONF_SERVICE            0x00010000
213  
214   #define CONF_SERVER_MASK       CONF_SERVER
215   #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
# Line 245 | Line 247 | struct CidrItem
247   #define CONF_FLAGS_NOMATCH_IP           0x00000020
248   #define CONF_FLAGS_EXEMPTKLINE          0x00000040
249   #define CONF_FLAGS_NOLIMIT              0x00000080
250 < #define CONF_FLAGS_IDLE_LINED           0x00000100
250 > /*                                      0x00000100 */
251   #define CONF_FLAGS_SPOOF_IP             0x00000200
252   #define CONF_FLAGS_SPOOF_NOTICE         0x00000400
253   #define CONF_FLAGS_REDIR                0x00000800
254   #define CONF_FLAGS_EXEMPTGLINE          0x00001000
255 < #define CONF_FLAGS_RESTRICTED           0x00002000
255 > /*                                      0x00002000 */
256   #define CONF_FLAGS_CAN_FLOOD            0x00100000
257   #define CONF_FLAGS_NEED_PASSWORD        0x00200000
258   /* server flags */
259   #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00004000
260 < #define CONF_FLAGS_LAZY_LINK            0x00008000
260 > /*                                      0x00008000 */
261   #define CONF_FLAGS_ENCRYPTED            0x00010000
262 < #define CONF_FLAGS_COMPRESSED           0x00020000
262 > #define CONF_FLAGS_UNUSED1___           0x00020000
263   #define CONF_FLAGS_TEMPORARY            0x00040000
264 < #define CONF_FLAGS_CRYPTLINK            0x00080000
264 > #define CONF_FLAGS_UNUSED2___           0x00080000
265   #define CONF_FLAGS_BURST_AWAY           0x00400000
266   #define CONF_FLAGS_EXEMPTRESV           0x00800000
267   #define CONF_FLAGS_TOPICBURST           0x01000000
268 + #define CONF_FLAGS_SSL                  0x02000000
269  
270   /* Macros for struct AccessItem */
271   #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
# Line 275 | Line 278 | struct CidrItem
278   #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
279   #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
280   #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
278 – #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
281   #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
282   #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
283   #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
282 – #define IsConfRestricted(x)     ((x)->flags & CONF_FLAGS_RESTRICTED)
284   #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
285   #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
286   #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
286 – #define IsConfCompressed(x)     ((x)->flags & CONF_FLAGS_COMPRESSED)
287 – #define SetConfCompressed(x)    ((x)->flags |= CONF_FLAGS_COMPRESSED)
288 – #define ClearConfCompressed(x)  ((x)->flags &= ~CONF_FLAGS_COMPRESSED)
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)
287   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
288   #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
289   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
# Line 301 | Line 296 | struct CidrItem
296   #define IsConfTopicBurst(x)     ((x)->flags & CONF_FLAGS_TOPICBURST)
297   #define SetConfTopicBurst(x)    ((x)->flags |= CONF_FLAGS_TOPICBURST)
298   #define ClearConfTopicBurst(x)  ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
299 + #define IsConfSSL(x)      ((x)->flags & CONF_FLAGS_SSL)
300 + #define SetConfSSL(x)     ((x)->flags |= CONF_FLAGS_SSL)
301 + #define ClearConfSSL(x)   ((x)->flags &= ~CONF_FLAGS_SSL)
302  
303   /* shared/cluster server entry types
304   * These defines are used for both shared and cluster.
305   */
306   #define SHARED_KLINE            0x0001
307 < #define SHARED_TKLINE           0x0002
308 < #define SHARED_UNKLINE          0x0004
309 < #define SHARED_XLINE            0x0008
310 < #define SHARED_TXLINE           0x0010
311 < #define SHARED_UNXLINE          0x0020
312 < #define SHARED_RESV             0x0040
313 < #define SHARED_TRESV            0x0080
314 < #define SHARED_UNRESV           0x0100
315 < #define SHARED_LOCOPS           0x0200
316 < #define SHARED_ALL              (SHARED_KLINE | SHARED_TKLINE | SHARED_UNKLINE | \
317 <                                 SHARED_XLINE | SHARED_TXLINE | SHARED_UNXLINE | \
318 <                                 SHARED_RESV | SHARED_TRESV | SHARED_UNRESV |\
321 <                                 SHARED_LOCOPS)
307 > #define SHARED_UNKLINE          0x0002
308 > #define SHARED_XLINE            0x0004
309 > #define SHARED_UNXLINE          0x0008
310 > #define SHARED_RESV             0x0010
311 > #define SHARED_UNRESV           0x0020
312 > #define SHARED_LOCOPS           0x0040
313 > #define SHARED_DLINE            0x0080
314 > #define SHARED_UNDLINE          0x0100
315 > #define SHARED_ALL              (SHARED_KLINE | SHARED_UNKLINE |\
316 >                                 SHARED_XLINE | SHARED_UNXLINE |\
317 >                                 SHARED_RESV | SHARED_UNRESV |\
318 >                                 SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
319  
320   /* gline acl entry actions */
321   #define GDENY_BLOCK             0x1
# Line 339 | Line 336 | struct config_file_entry
336  
337    char *logpath;
338    char *operlog;
342 –
343 –  char *servlink_path;
339    char *egdpool_path;
340 +  char *service_name;
341  
342    MessageFile motd;
343    MessageFile opermotd;
344    MessageFile linksfile;
345  
350 –  unsigned char compression_level;
346    int gline_min_cidr;
347    int gline_min_cidr6;
353 –  int dot_in_ip6_addr;
348    int dots_in_ident;
349    int failed_oper_notice;
350    int anti_spam_exit_message_time;
# Line 385 | Line 379 | struct config_file_entry
379    int pace_wait_simple;
380    int gline_time;
381    int gline_logging;
388 –  int idletime;
382    int oper_only_umodes;
383    int oper_umodes;
384    int max_targets;
# Line 401 | Line 394 | struct config_file_entry
394    int ping_cookie;
395    int disable_auth;
396    int disable_remote;
404 – #ifdef HAVE_LIBCRYPTO
405 –  struct EncCapability *default_cipher_preference;
406 – #endif
397   };
398  
399   struct config_channel_entry
# Line 428 | Line 418 | struct config_channel_entry
418  
419   struct config_server_hide
420   {
421 +  char *hidden_name;
422    int flatten_links;
423    int hide_servers;
433 –  char *hidden_name;
424    int links_delay;
425    int links_disabled;
426    int hidden;
# Line 440 | Line 430 | struct config_server_hide
430  
431   struct server_info
432   {
433 +  char *sid;
434    char *name;
435    char *description;
436    char *network_name;
# Line 451 | Line 442 | struct server_info
442    SSL_CTX *client_ctx;
443    unsigned int tls_version;
444   #endif
454 –  char *sid;
445    int hub;
446    struct irc_ssaddr ip;
447    struct irc_ssaddr ip6;
448 <  int max_clients;
448 >  unsigned int max_clients;
449    int specific_ipv4_vhost;
450    int specific_ipv6_vhost;
451    struct sockaddr_in dns_host;
# Line 472 | Line 462 | struct admin_info
462   struct logging_entry
463   {
464    unsigned int use_logging;
465 <  char operlog[PATH_MAX + 1];
476 <  char userlog[PATH_MAX + 1];
477 <  char glinelog[PATH_MAX + 1];
478 <  char ioerrlog[PATH_MAX + 1];
479 <  char klinelog[PATH_MAX + 1];
480 <  char killlog[PATH_MAX + 1];
481 <  char operspylog[PATH_MAX + 1];
482 <  char failed_operlog[PATH_MAX + 1];
465 >  unsigned int timestamp;
466   };
467  
468 < extern int ypass;
468 > extern dlink_list gdeny_items;
469   extern dlink_list class_items;
470   extern dlink_list server_items;
471   extern dlink_list cluster_items;
# Line 490 | Line 473 | extern dlink_list hub_items;
473   extern dlink_list rxconf_items;
474   extern dlink_list rkconf_items;
475   extern dlink_list leaf_items;
476 + extern dlink_list service_items;
477   extern dlink_list temporary_klines;
478   extern dlink_list temporary_dlines;
479   extern dlink_list temporary_glines;
# Line 531 | Line 515 | extern char *oper_privs_as_string(const
515   extern void split_nuh(struct split_nuh_item *);
516   extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
517                                                  const char *, const char *, int);
518 < extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
518 > extern struct ConfItem *find_exact_name_conf(ConfType, const struct Client *, const char *,
519                                               const char *, const char *);
520   extern void delete_conf_item(struct ConfItem *);
521   extern void report_confitem_types(struct Client *, ConfType, int);
# Line 548 | Line 532 | extern const char *get_conf_name(ConfTyp
532   extern int rehash(int);
533   extern int conf_add_server(struct ConfItem *, const char *);
534   extern void conf_add_class_to_conf(struct ConfItem *, const char *);
551 – extern void conf_add_d_conf(struct AccessItem *);
535  
536   /* XXX consider moving these into csvlib.h */
537   extern void parse_csv_file(FBFILE *, ConfType);
# Line 567 | Line 550 | extern int valid_comment(struct Client *
550  
551   #define TK_SECONDS 0
552   #define TK_MINUTES 1
553 < extern time_t valid_tkline(char *, int);
553 > extern time_t valid_tkline(const char *, int);
554   extern int match_conf_password(const char *, const struct AccessItem *);
555  
556   #define NOT_AUTHORIZED    (-1)
# Line 583 | Line 566 | extern void cluster_a_line(struct Client
566   extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
567  
568   /* XXX **/
569 < extern int yylex(void);
569 > //extern int yylex(void);
570  
571   #endif /* INCLUDED_s_conf_h */

Diff Legend

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