added basic ssl support to ircu
[ircu2.10.12-pk.git] / include / match.h
index 22a95b50b4269720d4f209d62ae324f4634c6bff..a2d7542ab973095e1f1e0dff1faa8dcf8b34759d 100644 (file)
@@ -1,7 +1,6 @@
-/*
- * match.h
- *
- * $Id$
+/** @file match.h
+ * @brief Interface for matching strings to IRC masks.
+ * @version $Id$
  */
 #ifndef INCLUDED_match_h
 #define INCLUDED_match_h
@@ -9,20 +8,10 @@
 #include <sys/types.h>         /* XXX - broken BSD system headers */
 #define INCLUDED_sys_types_h
 #endif
-#ifndef INCLUDED_netinet_in_h
-#include <netinet/in.h>        /* struct in_addr */
-#define INCLUDED_netinet_in_h
+#ifndef INCLUDED_res_h
+#include "res.h"
 #endif
 
-/*
- * Structures
- */
-struct in_mask {
-  struct in_addr bits;
-  struct in_addr mask;
-  int fall;
-};
-
 /*
  * Prototypes
  */
@@ -39,6 +28,7 @@ extern int matchcomp(char *cmask, int *minlen, int *charset, const char *mask);
 extern int matchexec(const char *string, const char *cmask, int minlen);
 extern int matchdecomp(char *mask, const char *cmask);
 extern int mmexec(const char *wcm, int wminlen, const char *rcm, int rminlen);
-extern int matchcompIP(struct in_mask *imask, const char *mask);
+
+extern int ipmask_check(const struct irc_in_addr *addr, const struct irc_in_addr *mask, unsigned char bits);
 
 #endif /* INCLUDED_match_h */