7a328a74d1af1fc89dc17725a4603871e30d7c7d
[ircu2.10.12-pk.git] / include / match.h
1 #ifndef MATCH_H
2 #define MATCH_H
3
4 /*=============================================================================
5  * System headers used by this header file
6  */
7 #include <sys/socket.h>
8 #include <netinet/in.h>
9 #include <arpa/inet.h>
10
11 /*=============================================================================
12  * Structures
13  */
14
15 struct in_mask {
16   struct in_addr bits;
17   struct in_addr mask;
18   int fall;
19 };
20
21 /*=============================================================================
22  * Proto types
23  */
24
25 extern int mmatch(const char *old_mask, const char *new_mask);
26 extern int match(const char *ma, const char *na);
27 extern char *collapse(char *pattern);
28
29 extern int matchcomp(char *cmask, int *minlen, int *charset, const char *mask);
30 extern int matchexec(const char *string, const char *cmask, int minlen);
31 extern int matchdecomp(char *mask, const char *cmask);
32 extern int mmexec(const char *wcm, int wminlen, const char *rcm, int rminlen);
33 extern int matchcompIP(struct in_mask *imask, const char *mask);
34
35 #endif /* MATCH_H */