1 |
Ipalloc: A dynamic IP allocator. |
Ipalloc: A dynamic IP allocator. |
2 |
|
(See the copying conditions at the end of this file.) |
3 |
|
|
4 |
* Overview |
* Overview |
5 |
|
|
13 |
|
|
14 |
* Database description |
* Database description |
15 |
|
|
16 |
The pool of IP adresses is kept in two database tables. |
The pool of IP addresses is kept in two database tables. |
17 |
|
|
18 |
** Table naspools |
** Table naspools |
19 |
|
|
35 |
user_name character(32) default '' not null |
user_name character(32) default '' not null |
36 |
); |
); |
37 |
|
|
38 |
Each row in this table represents a single IP adress. The address itself |
Each row in this table represents a single IP address. The address itself |
39 |
is stored in the field `ipaddr'. The field `pool' keeps the name of the |
is stored in the field `ipaddr'. The field `pool' keeps the name of the |
40 |
pool for this IP. These two fields never change. The rest of fields |
pool for this IP. These two fields never change. The rest of fields |
41 |
keep the state of the row. They are: |
keep the state of the row. They are: |
58 |
------------------+--------------------------------------------------------- |
------------------+--------------------------------------------------------- |
59 |
'FIXD' | This user should always be given this IP address. |
'FIXD' | This user should always be given this IP address. |
60 |
'ASGN' | The IP address is assigned to this user |
'ASGN' | The IP address is assigned to this user |
61 |
'RSRV' | The IP address is temporarly reserved for this user. |
'RSRV' | The IP address is temporarily reserved for this user. |
62 |
'BLCK' | The IP address is blocked and should never be used. |
'BLCK' | The IP address is blocked and should never be used. |
63 |
------------------+--------------------------------------------------------- |
------------------+--------------------------------------------------------- |
64 |
|
|
95 |
When the session is started, an accounting request arrives with the |
When the session is started, an accounting request arrives with the |
96 |
Acct-Session-Type attribute set to Start. Then the ipalloc looks up |
Acct-Session-Type attribute set to Start. Then the ipalloc looks up |
97 |
the entry with the matching pool and user_name and the value of status |
the entry with the matching pool and user_name and the value of status |
98 |
filed set to 'RSRV'. If such an entry is found, its status is changed |
field set to 'RSRV'. If such an entry is found, its status is changed |
99 |
to 'ASGN', thus ensuring it will not be used until the user logs out. |
to 'ASGN', thus ensuring it will not be used until the user logs out. |
100 |
|
|
101 |
Otherwise, if no start request arrives, this entry will eventually |
Otherwise, if no start request arrives, this entry will eventually |
155 |
The variable `ipalloc-sleep-time' sets the delay in microseconds |
The variable `ipalloc-sleep-time' sets the delay in microseconds |
156 |
between the two consecutive attempts. |
between the two consecutive attempts. |
157 |
|
|
158 |
|
|
159 |
|
Copyright (C) 2003 Free Software Foundation |
160 |
|
|
161 |
|
Permission is granted to copy, distribute and/or modify this |
162 |
|
document under the terms of the GNU Free Documentation License, |
163 |
|
Version 1.2 or any later version published by the Free Software |
164 |
|
Foundation; with no Invariant Sections, with the Front-Cover texts |
165 |
|
being "A GNU Manual", and with the Back-Cover Texts as in (a) |
166 |
|
below. A copy of the license is included in the file COPYING.DOC |
167 |
|
in this directory. |
168 |
|
|
169 |
|
(a) The FSF's Back-Cover Text is: "You have freedom to copy and |
170 |
|
modify this GNU Manual, like GNU software. Copies published by |
171 |
|
the Free Software Foundation raise funds for GNU development." |
172 |
|
|
173 |
|
|
174 |
Local Variables: |
Local Variables: |