| 1 | ############################################################################### |
|---|
| 2 | # |
|---|
| 3 | # hostmatch.txt: brief description of the hostmatch() pattern matcher |
|---|
| 4 | # |
|---|
| 5 | # Copyright 2002 the Ithildin Project. |
|---|
| 6 | # See the COPYING file for more information on licensing and use. |
|---|
| 7 | # |
|---|
| 8 | # $Id$ |
|---|
| 9 | # |
|---|
| 10 | ############################################################################### |
|---|
| 11 | |
|---|
| 12 | the host pattern matcher is much like the regular one, with two specific |
|---|
| 13 | additions, the collator and the lister. they work something like this: |
|---|
| 14 | a collator is a sequence that combines several individual characters into |
|---|
| 15 | one acceptable list. Let's say for instance you want to accept all users |
|---|
| 16 | who are in the IP range 192.168.42.100 - 192.168.42.149, you could do: |
|---|
| 17 | 192.168.42.1[01234][:number:], the [01234] matches any of the characters 0, |
|---|
| 18 | 1, 2, 3, or 4. the [:number:] item matches any one digit. Also allowed is |
|---|
| 19 | the [:alpha:] special collator, which allows any alphabetical character |
|---|
| 20 | (a-zA-Z), and the [:alnum:] collator, which allows any alphabetical |
|---|
| 21 | character or numerical character (like combining alpha and number, or |
|---|
| 22 | a-zA-Z0-9) |
|---|
| 23 | |
|---|
| 24 | The other feature, the list feature, allows you to specify a list of |
|---|
| 25 | acceptable letter(s), each accepted item separated by a | (pipe) character. |
|---|
| 26 | For instance, if you would like to match hosts on either anduril.org or |
|---|
| 27 | telekinesis.org, you could use the mask "*(anduril|telekinesis).org", or if |
|---|
| 28 | you wanted to match any user (presumably) in the USA, you might use |
|---|
| 29 | "*.(com|net|org|mil|us)". |
|---|
| 30 | |
|---|