Merge branch 'u2_10_12_branch' of git://git.code.sf.net/p/undernet-ircu/ircu2
[ircu2.10.12-pk.git] / include / IPcheck.h
diff --git a/include/IPcheck.h b/include/IPcheck.h
new file mode 100644 (file)
index 0000000..91693ac
--- /dev/null
@@ -0,0 +1,27 @@
+/** @file IPcheck.h
+ * @brief Interface to count users connected from particular IP addresses.
+ * @version $Id$
+ */
+#ifndef INCLUDED_ipcheck_h
+#define INCLUDED_ipcheck_h
+
+#ifndef INCLUDED_sys_types_h
+#include <sys/types.h>          /* time_t, size_t */
+#define INCLUDED_sys_types_h
+#endif
+
+struct Client;
+struct irc_in_addr;
+
+/*
+ * Prototypes
+ */
+extern void IPcheck_init(void);
+extern int IPcheck_local_connect(const struct irc_in_addr *ip, time_t *next_target_out);
+extern void IPcheck_connect_fail(const struct Client *cptr, int disconnect);
+extern void IPcheck_connect_succeeded(struct Client *cptr);
+extern int IPcheck_remote_connect(struct Client *cptr, int is_burst);
+extern void IPcheck_disconnect(struct Client *cptr);
+extern unsigned short IPcheck_nr(struct Client* cptr);
+
+#endif /* INCLUDED_ipcheck_h */