summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/channel.h2
-rw-r--r--include/client.h11
-rw-r--r--include/conf.h91
-rw-r--r--include/conf_class.h28
-rw-r--r--include/hostmask.h5
-rw-r--r--include/userhost.h8
6 files changed, 61 insertions, 84 deletions
diff --git a/include/channel.h b/include/channel.h
index dca2ff5..d81dac8 100644
--- a/include/channel.h
+++ b/include/channel.h
@@ -91,7 +91,7 @@ struct Ban
time_t when;
struct irc_ssaddr addr;
int bits;
- char type;
+ int type;
};
extern dlink_list global_channel_list;
diff --git a/include/client.h b/include/client.h
index 7ac400b..03d1d78 100644
--- a/include/client.h
+++ b/include/client.h
@@ -292,10 +292,9 @@ struct Client
#define FLAGS_BURSTED 0x00100000 /**< user was already bursted */
#define FLAGS_EXEMPTRESV 0x00200000 /**< client is exempt from RESV */
#define FLAGS_GOTUSER 0x00400000 /**< if we received a USER command */
-#define FLAGS_PINGWARNING 0x00800000 /**< unreplied ping warning already sent */
-#define FLAGS_FINISHED_AUTH 0x01000000 /**< Client has been released from auth */
-#define FLAGS_FLOOD_NOTICED 0x02000000 /**< Notice to opers about this flooder has been sent */
-#define FLAGS_SERVICE 0x04000000 /**< Client/server is a network service */
+#define FLAGS_FINISHED_AUTH 0x00800000 /**< Client has been released from auth */
+#define FLAGS_FLOOD_NOTICED 0x01000000 /**< Notice to opers about this flooder has been sent */
+#define FLAGS_SERVICE 0x02000000 /**< Client/server is a network service */
#define HasFlag(x, y) ((x)->flags & (y))
#define AddFlag(x, y) ((x)->flags |= (y))
@@ -405,10 +404,6 @@ struct Client
#define IsPingSent(x) ((x)->flags & FLAGS_PINGSENT)
#define ClearPingSent(x) ((x)->flags &= ~FLAGS_PINGSENT)
-#define SetPingWarning(x) ((x)->flags |= FLAGS_PINGWARNING)
-#define IsPingWarning(x) ((x)->flags & FLAGS_PINGWARNING)
-#define ClearPingWarning(x) ((x)->flags &= ~FLAGS_PINGWARNING)
-
#define SetNeedId(x) ((x)->flags |= FLAGS_NEEDID)
#define IsNeedId(x) ((x)->flags & FLAGS_NEEDID)
diff --git a/include/conf.h b/include/conf.h
index ac17aa2..bf27c55 100644
--- a/include/conf.h
+++ b/include/conf.h
@@ -25,9 +25,6 @@
#ifndef INCLUDED_s_conf_h
#define INCLUDED_s_conf_h
#include "config.h"
-#ifdef HAVE_LIBCRYPTO
-#include <openssl/rsa.h>
-#endif
#include "ircd_defs.h"
#include "motd.h" /* MessageFile */
#include "client.h"
@@ -36,8 +33,6 @@
-extern struct Callback *client_check_cb;
-
struct conf_parser_context
{
unsigned int boot;
@@ -66,7 +61,7 @@ enum maskitem_type
CONF_SERVICE = 1 << 14,
CONF_OPER = 1 << 15,
CONF_HUB = 1 << 16, /* XXX There are no separate hub/leaf configs anymore. This is just for /stats h */
- CONF_CLASS = 1 << 17
+ CONF_CLASS = 1 << 17 /* XXX Same here; just for /stats Y|y */
};
struct split_nuh_item
@@ -85,49 +80,45 @@ struct split_nuh_item
struct MaskItem
{
- struct MaskItem *hnext;
- dlink_node node;
+ struct MaskItem *hnext;
+ dlink_node node;
+ dlink_list leaf_list;
+ dlink_list hub_list;
enum maskitem_type type;
- unsigned int dns_failed;
- unsigned int dns_pending;
- unsigned int flags;
- unsigned int modes;
- unsigned int port;
- unsigned int count;
- unsigned int action;
- int clients; /* Number of *LOCAL* clients using this */
- int bits;
- unsigned int aftype;
- unsigned int htype;
- unsigned int active;
- struct irc_ssaddr bind; /* ip to bind to for outgoing connect */
- struct irc_ssaddr addr; /* ip to connect to */
- char * name;
- char * host; /* host part of user@host */
- char * passwd;
- char * spasswd; /* Password to send. */
- char * reason;
- char * user; /* user part of user@host */
- time_t hold; /* Hold action until this time (calendar time) */
- time_t setat;
- struct ClassItem *class; /* Class of connection */
-#ifdef HAVE_LIBCRYPTO
- /* certs */
- char *cipher_list;
- char * rsa_public_key_file;
- RSA * rsa_public_key;
-#endif
- void *regexuser;
- void *regexhost;
- dlink_list leaf_list;
- dlink_list hub_list;
+ unsigned int dns_failed;
+ unsigned int dns_pending;
+ unsigned int flags;
+ unsigned int modes;
+ unsigned int port;
+ unsigned int count;
+ unsigned int aftype;
+ unsigned int active;
+ unsigned int htype;
+ unsigned int ref_count; /* Number of *LOCAL* clients using this */
+ int bits;
+ time_t hold; /* Hold action until this time (calendar time) */
+ time_t setat;
+ struct irc_ssaddr bind; /* ip to bind to for outgoing connect */
+ struct irc_ssaddr addr; /* ip to connect to */
+ struct ClassItem *class; /* Class of connection */
+ char *name;
+ char *host; /* host part of user@host */
+ char *passwd;
+ char *spasswd; /* Password to send. */
+ char *reason;
+ char *user; /* user part of user@host */
+ char *cipher_list;
+ char *rsa_public_key_file;
+ void *rsa_public_key;
+ void *regexuser;
+ void *regexhost;
};
struct CidrItem
{
dlink_node node;
struct irc_ssaddr mask;
- int number_on_this_cidr;
+ unsigned int number_on_this_cidr;
};
@@ -137,9 +128,6 @@ struct CidrItem
#define IsConfGline(x) ((x)->type == CONF_GLINE)
/* MaskItem->flags */
-
-/* Generic flags... */
-/* access flags... */
#define CONF_FLAGS_DO_IDENTD 0x00000001
#define CONF_FLAGS_LIMIT_IP 0x00000002
#define CONF_FLAGS_NO_TILDE 0x00000004
@@ -153,7 +141,6 @@ struct CidrItem
#define CONF_FLAGS_EXEMPTGLINE 0x00000400
#define CONF_FLAGS_CAN_FLOOD 0x00000800
#define CONF_FLAGS_NEED_PASSWORD 0x00001000
-/* server flags */
#define CONF_FLAGS_ALLOW_AUTO_CONN 0x00002000
#define CONF_FLAGS_ENCRYPTED 0x00004000
#define CONF_FLAGS_IN_DATABASE 0x00008000
@@ -304,12 +291,10 @@ struct server_info
char *description;
char *network_name;
char *network_desc;
-#ifdef HAVE_LIBCRYPTO
char *rsa_private_key_file;
- RSA *rsa_private_key;
- SSL_CTX *server_ctx;
- SSL_CTX *client_ctx;
-#endif
+ void *rsa_private_key;
+ void *server_ctx;
+ void *client_ctx;
int hub;
struct irc_ssaddr ip;
struct irc_ssaddr ip6;
@@ -332,7 +317,6 @@ struct logging_entry
unsigned int use_logging;
};
-extern dlink_list class_items;
extern dlink_list server_items;
extern dlink_list cluster_items;
extern dlink_list xconf_items;
@@ -358,7 +342,8 @@ extern struct MaskItem *conf_make(enum maskitem_type);
extern void read_conf_files(int);
extern int attach_conf(struct Client *, struct MaskItem *);
extern int attach_connect_block(struct Client *, const char *, const char *);
-extern int get_conf_ping(const struct MaskItem *, int *);
+extern int check_client(struct Client *);
+
extern void detach_conf(struct Client *, enum maskitem_type);
extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
diff --git a/include/conf_class.h b/include/conf_class.h
index eae14b4..9a72b64 100644
--- a/include/conf_class.h
+++ b/include/conf_class.h
@@ -34,21 +34,20 @@ struct ClassItem
dlink_node node;
dlink_list list_ipv4; /* base of per cidr ipv4 client link list */
dlink_list list_ipv6; /* base of per cidr ipv6 client link list */
+ unsigned int ref_count;
unsigned int max_sendq;
unsigned int max_recvq;
- int con_freq;
- int ping_freq;
- int ping_warning;
- int max_total;
- int max_local;
- int max_global;
- int max_ident;
- int max_perip;
- int ref_count;
- int cidr_bitlen_ipv4;
- int cidr_bitlen_ipv6;
- int number_per_cidr;
- int active;
+ unsigned int con_freq;
+ unsigned int ping_freq;
+ unsigned int max_total;
+ unsigned int max_local;
+ unsigned int max_global;
+ unsigned int max_ident;
+ unsigned int max_perip;
+ unsigned int cidr_bitlen_ipv4;
+ unsigned int cidr_bitlen_ipv6;
+ unsigned int number_per_cidr;
+ unsigned int active;
};
/* address of default class conf */
@@ -59,13 +58,12 @@ extern const dlink_list *class_get_list(void);
extern void class_free(struct ClassItem *);
extern void class_init(void);
extern const char *get_client_class(const dlink_list *const);
-extern unsigned int get_client_ping(const dlink_list *const, int *);
+extern unsigned int get_client_ping(const dlink_list *const);
extern unsigned int get_sendq(const dlink_list *const);
extern unsigned int get_recvq(const dlink_list *const);
extern struct ClassItem *class_find(const char *, int);
extern void class_mark_for_deletion(void);
extern void class_delete_marked(void);
-extern void *check_client(va_list args);
extern void destroy_cidr_class(struct ClassItem *);
extern void rebuild_cidr_class(struct ClassItem *, struct ClassItem *);
extern int cidr_limit_reached(int, struct irc_ssaddr *, struct ClassItem *);
diff --git a/include/hostmask.h b/include/hostmask.h
index 219ad80..a8dc7c1 100644
--- a/include/hostmask.h
+++ b/include/hostmask.h
@@ -39,6 +39,8 @@ struct AddressRec
{
/* masktype: HM_HOST, HM_IPV4, HM_IPV6 -A1kmm */
enum hostmask_type masktype;
+ /* type: CONF_CLIENT, CONF_DLINE, CONF_KLINE etc... -A1kmm */
+ enum maskitem_type type;
union
{
@@ -53,9 +55,6 @@ struct AddressRec
const char *hostname;
} Mask;
- /* type: CONF_CLIENT, CONF_DLINE, CONF_KLINE etc... -A1kmm */
- enum maskitem_type type;
-
/* Higher precedences overrule lower ones... */
unsigned int precedence;
diff --git a/include/userhost.h b/include/userhost.h
index 2608507..40d5607 100644
--- a/include/userhost.h
+++ b/include/userhost.h
@@ -29,9 +29,9 @@ struct NameHost
{
dlink_node node; /* point to other names on this hostname */
char name[USERLEN + 1];
- int icount; /* number of =local= identd on this name*/
- int gcount; /* global user count on this name */
- int lcount; /* local user count on this name */
+ unsigned int icount; /* number of =local= identd on this name*/
+ unsigned int gcount; /* global user count on this name */
+ unsigned int lcount; /* local user count on this name */
};
struct UserHost
@@ -41,7 +41,7 @@ struct UserHost
char host[HOSTLEN + 1];
};
-extern void count_user_host(const char *, const char *, int *, int *, int *);
+extern void count_user_host(const char *, const char *, unsigned int *, unsigned int *, unsigned int *);
extern void add_user_host(const char *, const char *, int);
extern void delete_user_host(const char *, const char *, int global);
#endif /* INCLUDED_userhost_h */