in square brackets, even though only one range of addresses is
specified in this example.</para>
+ <para>Each <command>pool</command> is a structure that describes
+ the pool parameters. Currently there is only one parameter,
+ <command>pool</command>, which gives the range of addresses
+ in the pool. Additional parameters will be added in future
+ releases of Kea.</para>
+
<para>It is possible to define more than one pool in a subnet: continuing
the previous example, further assume that 192.0.2.64/26 should be also be
managed by the server. It could be written as 192.0.2.64 to
parser->build(pool);
- // Before we can create a pool, we need to ask the pool parser
- // to create it.
- parser->commit();
+ // Let's store the parser, but do not commit anything yet
+ parsers_.push_back(parser);
}
}
void PoolsListParser::commit() {
+
+ // Commit each parser first. It will store the pool structure
+ // in pools_.
+ BOOST_FOREACH(ParserPtr parser, parsers_) {
+ parser->commit();
+ }
+
if (pools_) {
// local_pools_ holds the values produced by the build function.
// At this point parsing should have completed successfuly so
/// A temporary storage for pools configuration. It is the
/// storage where pools are stored by the build function.
PoolStoragePtr local_pools_;
+
+ /// Collection of parsers;
+ ParserCollection parsers_;
};
/// @brief parser for additional relay information