]> jfr.im git - solanum.git/blobdiff - include/hostmask.h
Centralise banmask matching logic
[solanum.git] / include / hostmask.h
index 2a7878b91ae3f7ae25cab994e4f6b805121c2313..bb41b6c2f94fc91896824be05648cbb0ec07e01e 100644 (file)
@@ -21,8 +21,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
- *
- *  $Id: hostmask.h 2757 2006-11-10 22:58:15Z jilles $
  */
 
 #ifndef INCLUDE_hostmask_h
 enum
 {
        HM_HOST,
-       HM_IPV4
-#ifdef RB_IPV6
-               , HM_IPV6
-#endif
+       HM_IPV4,
+       HM_IPV6,
 };
 
-int parse_netmask(const char *, struct sockaddr *, int *);
+int parse_netmask(const char *, struct rb_sockaddr_storage *, int *);
 struct ConfItem *find_conf_by_address(const char *host, const char *sockhost,
                                      const char *orighost, struct sockaddr *,
                                      int, int, const char *, const char *);
@@ -56,13 +52,10 @@ struct ConfItem *find_dline(struct sockaddr *, int);
 #define find_kline(x)  (find_conf_by_address((x)->host, (x)->sockhost, \
                         (x)->orighost, \
                         (struct sockaddr *)&(x)->localClient->ip, CONF_KILL,\
-                        (x)->localClient->ip.ss_family, (x)->username, NULL))
+                        GET_SS_FAMILY(&(x)->localClient->ip), (x)->username, NULL))
 
-void report_Klines(struct Client *);
 void report_auth(struct Client *);
-#ifdef RB_IPV6
 int match_ipv6(struct sockaddr *, struct sockaddr *, int);
-#endif
 int match_ipv4(struct sockaddr *, struct sockaddr *, int);
 
 /* Hashtable stuff... */