| 28 |
|
#ifdef HAVE_LIBCRYPTO |
| 29 |
|
#include <openssl/rsa.h> |
| 30 |
|
#endif |
| 31 |
– |
#include "fileio.h" /* FBFILE */ |
| 31 |
|
#include "ircd_defs.h" |
| 32 |
|
#include "motd.h" /* MessageFile */ |
| 33 |
|
#include "client.h" |
| 34 |
|
#include "hook.h" |
| 35 |
|
|
| 36 |
|
|
| 38 |
– |
#define CONF_SERVER_INFO_TLS_VERSION_SSLV3 0x1 |
| 39 |
– |
#define CONF_SERVER_INFO_TLS_VERSION_TLSV1 0x2 |
| 40 |
– |
|
| 37 |
|
struct Client; |
| 38 |
|
|
| 39 |
|
extern struct Callback *client_check_cb; |
| 42 |
|
{ |
| 43 |
|
unsigned int boot; |
| 44 |
|
unsigned int pass; |
| 45 |
< |
FBFILE *conf_file; |
| 45 |
> |
FILE *conf_file; |
| 46 |
|
}; |
| 47 |
|
|
| 48 |
|
extern struct conf_parser_context conf_parser_ctx; |
| 171 |
|
int number_on_this_cidr; |
| 172 |
|
}; |
| 173 |
|
|
| 178 |
– |
#define ConFreq(x) ((x)->con_freq) |
| 179 |
– |
#define PingFreq(x) ((x)->ping_freq) |
| 180 |
– |
#define PingWarning(x) ((x)->ping_warning) |
| 181 |
– |
#define MaxTotal(x) ((x)->max_total) |
| 182 |
– |
#define MaxGlobal(x) ((x)->max_global) |
| 183 |
– |
#define MaxLocal(x) ((x)->max_local) |
| 184 |
– |
#define MaxIdent(x) ((x)->max_ident) |
| 185 |
– |
#define MaxPerIp(x) ((x)->max_perip) |
| 186 |
– |
#define MaxSendq(x) ((x)->max_sendq) |
| 187 |
– |
#define CurrUserCount(x) ((x)->curr_user_count) |
| 188 |
– |
#define CidrBitlenIPV4(x) ((x)->cidr_bitlen_ipv4) |
| 189 |
– |
#define CidrBitlenIPV6(x) ((x)->cidr_bitlen_ipv6) |
| 190 |
– |
#define NumberPerCidr(x) ((x)->number_per_cidr) |
| 191 |
– |
|
| 192 |
– |
#define ClassPtr(x) ((x)->class_ptr) |
| 193 |
– |
|
| 174 |
|
|
| 175 |
|
#define CONF_ILLEGAL 0x80000000 |
| 176 |
|
#define CONF_RESERVED 0x00000001 |
| 177 |
|
#define CONF_CLIENT 0x00000002 |
| 178 |
|
#define CONF_SERVER 0x00000004 |
| 179 |
|
#define CONF_OPERATOR 0x00000008 |
| 180 |
< |
#define CONF_KILL 0x00000010 |
| 201 |
< |
#define CONF_KLINE CONF_KILL |
| 180 |
> |
#define CONF_KLINE 0x00000010 |
| 181 |
|
#define CONF_CLASS 0x00000020 |
| 182 |
|
#define CONF_LEAF 0x00000040 |
| 183 |
|
#define CONF_LISTEN_PORT 0x00000080 |
| 184 |
|
#define CONF_HUB 0x00000100 |
| 185 |
|
#define CONF_EXEMPTKLINE 0x00000200 |
| 186 |
< |
#define CONF_NOLIMIT 0x00000400 |
| 187 |
< |
#define CONF_DLINE 0x00000800 |
| 188 |
< |
#define CONF_XLINE 0x00001000 |
| 189 |
< |
#define CONF_ULINE 0x00002000 |
| 190 |
< |
#define CONF_EXEMPTDLINE 0x00004000 |
| 191 |
< |
#define CONF_GLINE 0x00008000 |
| 213 |
< |
#define CONF_SERVICE 0x00010000 |
| 186 |
> |
#define CONF_DLINE 0x00000400 |
| 187 |
> |
#define CONF_XLINE 0x00000800 |
| 188 |
> |
#define CONF_ULINE 0x00001000 |
| 189 |
> |
#define CONF_EXEMPTDLINE 0x00002000 |
| 190 |
> |
#define CONF_GLINE 0x00004000 |
| 191 |
> |
#define CONF_SERVICE 0x00008000 |
| 192 |
|
|
| 193 |
|
#define CONF_SERVER_MASK CONF_SERVER |
| 194 |
|
#define CONF_CLIENT_MASK (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK) |
| 207 |
|
#define IsConfLeaf(x) ((x)->status == CONF_LEAF) |
| 208 |
|
#define SetConfLeaf(x) ((x)->status = CONF_LEAF) |
| 209 |
|
#define IsConfHubOrLeaf(x) ((x)->status & (CONF_HUB|CONF_LEAF)) |
| 210 |
< |
#define IsConfKill(x) ((x)->status == CONF_KILL) |
| 210 |
> |
#define IsConfKill(x) ((x)->status == CONF_KLINE) |
| 211 |
|
#define IsConfClient(x) ((x)->status & CONF_CLIENT) |
| 212 |
|
#define IsConfTypeOfClient(x) ((x)->status & CONF_CLIENT_MASK) |
| 213 |
|
#define IsConfUline(x) ((x)->status & CONF_ULINE) |
| 222 |
|
#define CONF_FLAGS_LIMIT_IP 0x00000002 |
| 223 |
|
#define CONF_FLAGS_NO_TILDE 0x00000004 |
| 224 |
|
#define CONF_FLAGS_NEED_IDENTD 0x00000008 |
| 225 |
< |
/* 0x00000010 */ |
| 226 |
< |
#define CONF_FLAGS_NOMATCH_IP 0x00000020 |
| 227 |
< |
#define CONF_FLAGS_EXEMPTKLINE 0x00000040 |
| 228 |
< |
#define CONF_FLAGS_NOLIMIT 0x00000080 |
| 229 |
< |
/* 0x00000100 */ |
| 230 |
< |
#define CONF_FLAGS_SPOOF_IP 0x00000200 |
| 231 |
< |
#define CONF_FLAGS_SPOOF_NOTICE 0x00000400 |
| 232 |
< |
#define CONF_FLAGS_REDIR 0x00000800 |
| 233 |
< |
#define CONF_FLAGS_EXEMPTGLINE 0x00001000 |
| 256 |
< |
/* 0x00002000 */ |
| 257 |
< |
#define CONF_FLAGS_CAN_FLOOD 0x00100000 |
| 258 |
< |
#define CONF_FLAGS_NEED_PASSWORD 0x00200000 |
| 225 |
> |
#define CONF_FLAGS_NOMATCH_IP 0x00000010 |
| 226 |
> |
#define CONF_FLAGS_EXEMPTKLINE 0x00000020 |
| 227 |
> |
#define CONF_FLAGS_NOLIMIT 0x00000040 |
| 228 |
> |
#define CONF_FLAGS_SPOOF_IP 0x00000080 |
| 229 |
> |
#define CONF_FLAGS_SPOOF_NOTICE 0x00000100 |
| 230 |
> |
#define CONF_FLAGS_REDIR 0x00000200 |
| 231 |
> |
#define CONF_FLAGS_EXEMPTGLINE 0x00000400 |
| 232 |
> |
#define CONF_FLAGS_CAN_FLOOD 0x00000800 |
| 233 |
> |
#define CONF_FLAGS_NEED_PASSWORD 0x00001000 |
| 234 |
|
/* server flags */ |
| 235 |
< |
#define CONF_FLAGS_ALLOW_AUTO_CONN 0x00004000 |
| 236 |
< |
/* 0x00008000 */ |
| 237 |
< |
#define CONF_FLAGS_ENCRYPTED 0x00010000 |
| 238 |
< |
#define CONF_FLAGS_UNUSED1___ 0x00020000 |
| 239 |
< |
#define CONF_FLAGS_TEMPORARY 0x00040000 |
| 240 |
< |
#define CONF_FLAGS_UNUSED2___ 0x00080000 |
| 241 |
< |
#define CONF_FLAGS_BURST_AWAY 0x00400000 |
| 267 |
< |
#define CONF_FLAGS_EXEMPTRESV 0x00800000 |
| 268 |
< |
#define CONF_FLAGS_TOPICBURST 0x01000000 |
| 269 |
< |
#define CONF_FLAGS_SSL 0x02000000 |
| 235 |
> |
#define CONF_FLAGS_ALLOW_AUTO_CONN 0x00002000 |
| 236 |
> |
#define CONF_FLAGS_ENCRYPTED 0x00004000 |
| 237 |
> |
#define CONF_FLAGS_TEMPORARY 0x00008000 |
| 238 |
> |
#define CONF_FLAGS_BURST_AWAY 0x00010000 |
| 239 |
> |
#define CONF_FLAGS_EXEMPTRESV 0x00020000 |
| 240 |
> |
#define CONF_FLAGS_TOPICBURST 0x00040000 |
| 241 |
> |
#define CONF_FLAGS_SSL 0x00080000 |
| 242 |
|
|
| 243 |
|
/* Macros for struct AccessItem */ |
| 244 |
|
#define IsLimitIp(x) ((x)->flags & CONF_FLAGS_LIMIT_IP) |
| 307 |
|
const char *cresvfile; |
| 308 |
|
const char *nresvfile; |
| 309 |
|
|
| 338 |
– |
char *logpath; |
| 339 |
– |
char *operlog; |
| 310 |
|
char *egdpool_path; |
| 311 |
|
char *service_name; |
| 312 |
|
|
| 443 |
|
extern dlink_list rkconf_items; |
| 444 |
|
extern dlink_list leaf_items; |
| 445 |
|
extern dlink_list service_items; |
| 476 |
– |
extern dlink_list temporary_klines; |
| 477 |
– |
extern dlink_list temporary_dlines; |
| 478 |
– |
extern dlink_list temporary_glines; |
| 446 |
|
extern dlink_list temporary_xlines; |
| 480 |
– |
extern dlink_list temporary_rxlines; |
| 481 |
– |
extern dlink_list temporary_rklines; |
| 447 |
|
extern struct logging_entry ConfigLoggingEntry; |
| 448 |
|
extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/ |
| 449 |
|
extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/ |
| 482 |
|
extern struct ConfItem *find_exact_name_conf(ConfType, const struct Client *, const char *, |
| 483 |
|
const char *, const char *); |
| 484 |
|
extern void delete_conf_item(struct ConfItem *); |
| 485 |
< |
extern void report_confitem_types(struct Client *, ConfType, int); |
| 485 |
> |
extern void report_confitem_types(struct Client *, ConfType); |
| 486 |
|
extern void yyerror(const char *); |
| 522 |
– |
extern int conf_yy_fatal_error(const char *); |
| 523 |
– |
extern int conf_fbgets(char *, unsigned int, FBFILE *); |
| 487 |
|
extern void write_conf_line(struct Client *, struct ConfItem *, |
| 488 |
|
const char *, time_t); |
| 489 |
|
extern int remove_conf_line(ConfType, struct Client *, const char *, |
| 496 |
|
extern void conf_add_class_to_conf(struct ConfItem *, const char *); |
| 497 |
|
|
| 498 |
|
/* XXX consider moving these into csvlib.h */ |
| 499 |
< |
extern void parse_csv_file(FBFILE *, ConfType); |
| 500 |
< |
|
| 501 |
< |
extern char *get_oper_name(const struct Client *); |
| 499 |
> |
extern void parse_csv_file(FILE *, ConfType); |
| 500 |
> |
extern int find_and_delete_temporary(const char *, const char *, int); |
| 501 |
> |
extern const char *get_oper_name(const struct Client *); |
| 502 |
|
|
| 503 |
|
extern void *map_to_conf(struct ConfItem *); |
| 504 |
|
extern struct ConfItem *unmap_conf_item(void *); |
| 526 |
|
extern void cluster_a_line(struct Client *, |
| 527 |
|
const char *, int, int, const char *,...); |
| 528 |
|
extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *); |
| 566 |
– |
|
| 567 |
– |
/* XXX **/ |
| 568 |
– |
//extern int yylex(void); |
| 569 |
– |
|
| 529 |
|
#endif /* INCLUDED_s_conf_h */ |