X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fmatch.h;h=a2d7542ab973095e1f1e0dff1faa8dcf8b34759d;hb=3d59398668e6f0977c147c5efeefe7582d05b25b;hp=22a95b50b4269720d4f209d62ae324f4634c6bff;hpb=ae91ef6320f611af74e70a0db2620c338fbaa7d5;p=ircu2.10.12-pk.git diff --git a/include/match.h b/include/match.h index 22a95b5..a2d7542 100644 --- a/include/match.h +++ b/include/match.h @@ -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 /* XXX - broken BSD system headers */ #define INCLUDED_sys_types_h #endif -#ifndef INCLUDED_netinet_in_h -#include /* 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 */