"type": "postgresql",
// User name to be used to access the database.
- "user": "keatest"
+ "user": "keatest",
+
+ // TCP user timeout while communicating with the database.
+ "tcp-user-timeout": 100
},
{
// Name of the database to connect to.
"on-fail": "stop-retry-exit",
// Connection connect timeout.
- "connect-timeout": 100
+ "connect-timeout": 100,
+
+ // Data read from the database timeout.
+ "read-timeout": 120,
+
+ // Data write to the database timeout.
+ "write-timeout": 180
}
],
"type": "postgresql",
// User name to be used to access the database.
- "user": "keatest"
+ "user": "keatest",
+
+ // TCP user timeout while communicating with the database.
+ "tcp-user-timeout": 100
},
{
// Name of the database to connect to.
"on-fail": "stop-retry-exit",
// Connection connect timeout.
- "connect-timeout": 100
+ "connect-timeout": 100,
+
+ // Data read from the database timeout.
+ "read-timeout": 120,
+
+ // Data write to the database timeout.
+ "write-timeout": 180
}
],
}
}
+\"read-timeout\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::LEASE_DATABASE:
+ case isc::dhcp::Parser4Context::HOSTS_DATABASE:
+ case isc::dhcp::Parser4Context::CONFIG_DATABASE:
+ return isc::dhcp::Dhcp4Parser::make_READ_TIMEOUT(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("read-timeout", driver.loc_);
+ }
+}
+
+\"write-timeout\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::LEASE_DATABASE:
+ case isc::dhcp::Parser4Context::HOSTS_DATABASE:
+ case isc::dhcp::Parser4Context::CONFIG_DATABASE:
+ return isc::dhcp::Dhcp4Parser::make_WRITE_TIMEOUT(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("write-timeout", driver.loc_);
+ }
+}
+
+\"tcp-user-timeout\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::LEASE_DATABASE:
+ case isc::dhcp::Parser4Context::HOSTS_DATABASE:
+ case isc::dhcp::Parser4Context::CONFIG_DATABASE:
+ return isc::dhcp::Dhcp4Parser::make_TCP_USER_TIMEOUT(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("tcp-user-timeout", driver.loc_);
+ }
+}
+
\"reconnect-wait-time\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
CONNECT_TIMEOUT "connect-timeout"
+ READ_TIMEOUT "read-timeout"
+ WRITE_TIMEOUT "write-timeout"
+ TCP_USER_TIMEOUT "tcp-user-timeout"
MAX_RECONNECT_TRIES "max-reconnect-tries"
RECONNECT_WAIT_TIME "reconnect-wait-time"
ON_FAIL "on-fail"
| lfc_interval
| readonly
| connect_timeout
+ | read_timeout
+ | write_timeout
+ | tcp_user_timeout
| max_reconnect_tries
| reconnect_wait_time
| on_fail
ctx.stack_.back()->set("connect-timeout", n);
};
+read_timeout: READ_TIMEOUT COLON INTEGER {
+ ctx.unique("read-timeout", ctx.loc2pos(@1));
+ ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("read-timeout", n);
+};
+
+write_timeout: WRITE_TIMEOUT COLON INTEGER {
+ ctx.unique("write-timeout", ctx.loc2pos(@1));
+ ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("write-timeout", n);
+};
+
+tcp_user_timeout: TCP_USER_TIMEOUT COLON INTEGER {
+ ctx.unique("tcp-user-timeout", ctx.loc2pos(@1));
+ ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("tcp-user-timeout", n);
+};
+
max_reconnect_tries: MAX_RECONNECT_TRIES COLON INTEGER {
ctx.unique("max-reconnect-tries", ctx.loc2pos(@1));
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
}
}
+\"read-timeout\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser6Context::LEASE_DATABASE:
+ case isc::dhcp::Parser6Context::HOSTS_DATABASE:
+ case isc::dhcp::Parser6Context::CONFIG_DATABASE:
+ return isc::dhcp::Dhcp6Parser::make_READ_TIMEOUT(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp6Parser::make_STRING("read-timeout", driver.loc_);
+ }
+}
+
+\"write-timeout\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser6Context::LEASE_DATABASE:
+ case isc::dhcp::Parser6Context::HOSTS_DATABASE:
+ case isc::dhcp::Parser6Context::CONFIG_DATABASE:
+ return isc::dhcp::Dhcp6Parser::make_WRITE_TIMEOUT(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp6Parser::make_STRING("write-timeout", driver.loc_);
+ }
+}
+
+\"tcp-user-timeout\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser6Context::LEASE_DATABASE:
+ case isc::dhcp::Parser6Context::HOSTS_DATABASE:
+ case isc::dhcp::Parser6Context::CONFIG_DATABASE:
+ return isc::dhcp::Dhcp6Parser::make_TCP_USER_TIMEOUT(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp6Parser::make_STRING("tcp-user-timeout", driver.loc_);
+ }
+}
+
\"reconnect-wait-time\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
CONNECT_TIMEOUT "connect-timeout"
+ READ_TIMEOUT "read-timeout"
+ WRITE_TIMEOUT "write-timeout"
+ TCP_USER_TIMEOUT "tcp-user-timeout"
MAX_RECONNECT_TRIES "max-reconnect-tries"
RECONNECT_WAIT_TIME "reconnect-wait-time"
ON_FAIL "on-fail"
| lfc_interval
| readonly
| connect_timeout
+ | read_timeout
+ | write_timeout
+ | tcp_user_timeout
| max_reconnect_tries
| reconnect_wait_time
| on_fail
ctx.stack_.back()->set("connect-timeout", n);
};
+read_timeout: READ_TIMEOUT COLON INTEGER {
+ ctx.unique("read-timeout", ctx.loc2pos(@1));
+ ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("connect-timeout", n);
+};
+
+write_timeout: WRITE_TIMEOUT COLON INTEGER {
+ ctx.unique("write-timeout", ctx.loc2pos(@1));
+ ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("write-timeout", n);
+};
+
+tcp_user_timeout: TCP_USER_TIMEOUT COLON INTEGER {
+ ctx.unique("tcp-user-timeout", ctx.loc2pos(@1));
+ ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("tcp-user-timeout", n);
+};
+
+
reconnect_wait_time: RECONNECT_WAIT_TIME COLON INTEGER {
ctx.unique("reconnect-wait-time", ctx.loc2pos(@1));
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));