| 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 |
| 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 |
| 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; |
| 96 |
< |
dlink_node node; /* link into known ConfItems of this type */ |
| 97 |
> |
void *regexpname; |
| 98 |
|
unsigned int flags; |
| 99 |
|
ConfType type; |
| 100 |
|
}; |
| 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 */ |
| 133 |
|
char * reason; |
| 134 |
|
char * oper_reason; |
| 135 |
|
char * user; /* user part of user@host */ |
| 134 |
– |
int port; |
| 135 |
– |
char * fakename; /* Mask name */ |
| 136 |
|
time_t hold; /* Hold action until this time (calendar time) */ |
| 137 |
|
struct ConfItem *class_ptr; /* Class of connection */ |
| 138 |
|
int aftype; |
| 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 |
+ |
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; |
| 162 |
|
int cidr_bitlen_ipv4; |
| 163 |
|
int cidr_bitlen_ipv6; |
| 164 |
|
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 |
| 169 |
|
{ |
| 170 |
+ |
dlink_node node; |
| 171 |
|
struct irc_ssaddr mask; |
| 172 |
|
int number_on_this_cidr; |
| 172 |
– |
dlink_node node; |
| 173 |
|
}; |
| 174 |
|
|
| 175 |
|
#define ConFreq(x) ((x)->con_freq) |
| 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) |
| 342 |
|
|
| 343 |
|
char *servlink_path; |
| 344 |
|
char *egdpool_path; |
| 345 |
+ |
char *service_name; |
| 346 |
|
|
| 347 |
|
MessageFile motd; |
| 348 |
|
MessageFile opermotd; |
| 351 |
|
unsigned char compression_level; |
| 352 |
|
int gline_min_cidr; |
| 353 |
|
int gline_min_cidr6; |
| 352 |
– |
int dot_in_ip6_addr; |
| 354 |
|
int dots_in_ident; |
| 355 |
|
int failed_oper_notice; |
| 356 |
|
int anti_spam_exit_message_time; |
| 428 |
|
|
| 429 |
|
struct config_server_hide |
| 430 |
|
{ |
| 431 |
+ |
char *hidden_name; |
| 432 |
|
int flatten_links; |
| 433 |
|
int hide_servers; |
| 432 |
– |
char *hidden_name; |
| 434 |
|
int links_delay; |
| 435 |
|
int links_disabled; |
| 436 |
|
int hidden; |
| 440 |
|
|
| 441 |
|
struct server_info |
| 442 |
|
{ |
| 443 |
+ |
char *sid; |
| 444 |
|
char *name; |
| 445 |
|
char *description; |
| 446 |
|
char *network_name; |
| 452 |
|
SSL_CTX *client_ctx; |
| 453 |
|
unsigned int tls_version; |
| 454 |
|
#endif |
| 453 |
– |
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; |
| 482 |
|
char failed_operlog[PATH_MAX + 1]; |
| 483 |
|
}; |
| 484 |
|
|
| 485 |
+ |
extern dlink_list gdeny_items; |
| 486 |
|
extern dlink_list class_items; |
| 487 |
|
extern dlink_list server_items; |
| 488 |
|
extern dlink_list cluster_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; |
| 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) |