Commit a336d5f8 authored by Francis Dupont's avatar Francis Dupont

[5061] Added port parameter

parent 58a9eca1
......@@ -330,6 +330,16 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"port\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_PORT(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("port", driver.loc_);
}
}
\"persist\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
......
......@@ -72,6 +72,7 @@ using namespace std;
USER "user"
PASSWORD "password"
HOST "host"
PORT "port"
PERSIST "persist"
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
......@@ -513,6 +514,7 @@ database_map_param: database_type
| user
| password
| host
| port
| name
| persist
| lfc_interval
......@@ -558,6 +560,11 @@ host: HOST {
ctx.leave();
};
port: PORT COLON INTEGER {
ElementPtr p(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("port", p);
};
name: NAME {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
......
......@@ -530,6 +530,16 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"port\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_PORT(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("port", driver.loc_);
}
}
\"persist\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
......
......@@ -63,6 +63,7 @@ using namespace std;
USER "user"
PASSWORD "password"
HOST "host"
PORT "port"
PERSIST "persist"
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
......@@ -498,6 +499,7 @@ database_map_param: database_type
| user
| password
| host
| port
| name
| persist
| lfc_interval
......@@ -543,6 +545,11 @@ host: HOST {
ctx.leave();
};
port: PORT COLON INTEGER {
ElementPtr p(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("port", p);
};
name: NAME {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment