Adding route to ipv6 router who received delegated prefix
Joel Peshkin
joel at peshkin.net
Sun Nov 20 16:02:08 UTC 2011
To help the next person who is looking for this information....
There seem to be 4 types of "on event" statements. COMMIT, EXPIRY,
RELEASE, and TRANSMISSION. Only the first 3 seem to make any sense on
the server.
The 2 variables that are known to be useful within an "on commit"
statement are "lease-address" and "hardware". A bit more reverse
engineering will be required to determine if another variable is needed
to figure out what prefix has been granted or if it is encoded in
lease-address.
/*
* on-statement :== event-types LBRACE executable-statements RBRACE
* event-types :== event-type OR event-types |
* event-type
* event-type :== EXPIRY | COMMIT | RELEASE
*/
int parse_on_statement (result, cfile, lose)
struct executable_statement **result;
struct parse *cfile;
int *lose;
{
enum dhcp_token token;
const char *val;
if (!executable_statement_allocate (result, MDL))
log_fatal ("no memory for new statement.");
(*result) -> op = on_statement;
do {
token = next_token (&val, (unsigned *)0, cfile);
switch (token) {
case EXPIRY:
(*result) -> data.on.evtypes |= ON_EXPIRY;
break;
case COMMIT:
(*result) -> data.on.evtypes |= ON_COMMIT;
break;
case RELEASE:
(*result) -> data.on.evtypes |= ON_RELEASE;
break;
case TRANSMISSION:
(*result) -> data.on.evtypes |= ON_TRANSMISSION;
break;
default:
parse_warn (cfile, "expecting a lease event type");
skip_to_semi (cfile);
*lose = 1;
More information about the dhcp-users
mailing list