Omega Security Services 0.7.3

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]addrAddress to test.
[in]maskAddress to test against.
[in]bitsNumber 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:
patternTo be matched
strString in which the pattern is to be matched
docaseCase 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().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines