[kea-dev] Hooks libraries and configuration information

Tomek Mrugalski tomasz at isc.org
Fri Oct 30 01:46:52 UTC 2015


On 17/10/15 00:48, Vadim Fedorenko wrote:
> It's good point to have an access to full configuration values inside
> the hook library. For example, I want to know the lease database
> connection parameters to make my hooks library access the same
> database for some reasons. And it's not a good thing to make
> duplicates in library's own parameter list.
Hi Vadim!

First of all, sorry for not replying earlier. Your mail must have
slipped through.

Yes, you are right. The situation could be improved. There are at least
three aspects.

First, accessing general configuration from hooks. For example, hooks
library could look at the subnets or options information. See ticket
#3456 for details. Until this ticket is implemented, you could include
dhcpsrv/cfgmgr.h and call CfgMgr::instance().getCurrentCfg() to access
the full configuration. Care must be taken to not modify the configuration.

Second, if MySQL or Postgres is used, the connection could be exposed to
the hooks. See #3457.

Third, there should be a way to provide hook specific configuration
parameters. For example, a hook library may want to have a verbose
switch or name of a file etc. See #3259. The initial part of this effort
is currently under review. It should go through into 1.0.

The first two tickets are not planned for 1.0. It's simply because of
time constraints and the number of other tickets that we need to do for
1.0. We'll discuss those tickets and see if we can squeeze them into 1.1.

Tomek


More information about the kea-dev mailing list