Allow netblocks to be used in CIDR indexes.
[python-rwhoisd.git] / README
1 WHAT IS THIS?
2
3 As a programming exercise for learning Python, I wrote a simple rwhois
4 server (described in RFC 2167).  It uses in-memory data structures,
5 and it intuits the schema based on the data it sees.  The server takes
6 as input a schema file, which for now just describes which attributes
7 should be indexed (and how), and data files which look much like the C
8 rwhoisd's data files.
9
10 This version supports a sort of extended query syntax: IP or CIDR
11 queries ending in "**" will result in a "subnet" search, where all of
12 the found subnets at or below the specified network will be returned.
13 Ending a IP or CIDR query with a single "*" will result in a
14 "supernet" search.
15
16 REQUIREMENTS
17
18 python 2.4 or later
19
20 INSTALL
21
22 This can be run from it's source directory, which is a fine way to do
23 it.
24
25 However, if you wish to install it, as root:
26
27 % python setup.py install
28
29 This is just using the standard Python distutils, so there is actually
30 a great deal of flexibility here.  Try
31
32 % python setup.py install --help
33
34 to see some of the options available.
35
36 RUNNING IT
37
38 This is assuming that you are running it from the distribution
39 directory.
40
41 % tar zxvf python-rwhoisd-0.4.tar.gz
42
43 % cd python-rwhoisd-0.4
44
45 % ./bin/pyrwhoisd sample_data/example_schema \
46                   sample_data/example_data &
47
48 Voila!  You should now have some sort of rwhois server running on port
49 4321
50
51 CONFIGURING IT
52
53 Edit rwhoisd/config.py.
54
55 This file has comments describing options that you can change.
56
57 DATA
58
59 See the example_schema and example_data files in the sample_data
60 directory.
61
62 The format of the data files is very similar to the format used by the
63 C rwhois server (rwhoisd-1.5.x from www.rwhois.net).  It has the
64 following differences, however:
65
66 * These files may have records separated by blank lines instead of
67   dashes.
68
69 * They are not sensitive to trailing separators (whitespace or
70   dashes)
71
72 * They do not have to be arranged in any special manner.  That is, the
73   C rwhoisd forces (or at least encourages) you to arrange your data
74   files into different directories per authority-area.  These can be
75   wherever.
76
77 * This server does not support attribute "aliases".
78
79 * It doesn't quite support indexing network blocks (i.e., values like
80   "10.1.42.0 - 10.1.42.255").
81
82 It should be noted that this server in small ways violates the
83 description put forth by RFC 2167.  In particular, it does not
84 establish independent schemas for each authority area.  There may be
85 other violations as well.