match.h File Reference

Go to the source code of this file.

Functions

int match_regx (char *, char *)
int match_wild (const char *pattern, const char *str, int docase)
int match_cidr (unsigned char addr[16], unsigned char mask[16], unsigned char bits)

Function Documentation

int match_cidr ( unsigned char  addr[16],
unsigned char  mask[16],
unsigned char  bits 
)

Test whether an address matches the most significant bits of a mask.

Parameters:
[in] addr Address to test.
[in] mask Address to test against.
[in] bits Number of bits to test.
Returns:
0 on mismatch, 1 if bits <= 128 and all bits match; -1 if bits > 128 and all bits match.

Given to us by jobe.

Definition at line 118 of file match.c.

int match_regx ( char *  ,
char *   
)

Definition at line 33 of file match.c.

Referenced by VerifyConf().

int match_wild ( const char *  pattern,
const char *  str,
int  docase 
)

do_match_wild: Attempt to match a string to a pattern which might contain '*' or '?' wildcards. Return 1 if the string matches the pattern, 0 if not.

Parameters:
pattern To be matched
str String in which the pattern is to be matched
docase Case In/Senstive
Returns:
1 if the string matches the pattern, 0 if not.

match_wild borrowed from Anope1.7.21

Definition at line 65 of file match.c.

References match_wild().

Referenced by find_access(), and match_wild().

Generated on Mon Jul 19 21:53:05 2010 for Omega Security Services by  doxygen 1.6.3