File: match.h

package info (click to toggle)
ircd 2.10.07-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,232 kB
  • ctags: 2,253
  • sloc: ansic: 27,541; makefile: 742; sh: 327; perl: 18
file content (35 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MATCH_H
#define MATCH_H

/*=============================================================================
 * System headers used by this header file
 */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

/*=============================================================================
 * Structures
 */

struct in_mask {
  struct in_addr bits;
  struct in_addr mask;
  int fall;
};

/*=============================================================================
 * Proto types
 */

extern int mmatch(const char *old_mask, const char *new_mask);
extern int match(const char *ma, const char *na);
extern char *collapse(char *pattern);

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);

#endif /* MATCH_H */