diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-02-10 18:01:50 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-02-12 14:34:33 +0100 |
commit | 9925eeabd2a617cb45d0f0a2f1b3605f763ffd2c (patch) | |
tree | da44e03dac702e1cd876c32304218ffb1314a403 /src/libstrongswan/utils/settings.h | |
parent | f4da1989cd595785a4c3e2f6effcfbb28a103377 (diff) | |
download | strongswan-9925eeabd2a617cb45d0f0a2f1b3605f763ffd2c.tar.bz2 strongswan-9925eeabd2a617cb45d0f0a2f1b3605f763ffd2c.tar.xz |
settings: Add support to enumerate sections and key/value pairs with fallbacks
Diffstat (limited to 'src/libstrongswan/utils/settings.h')
-rw-r--r-- | src/libstrongswan/utils/settings.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libstrongswan/utils/settings.h b/src/libstrongswan/utils/settings.h index 6154ad8b9..46403c4d3 100644 --- a/src/libstrongswan/utils/settings.h +++ b/src/libstrongswan/utils/settings.h @@ -276,13 +276,12 @@ struct settings_t { * 'section-one.two' will result in a lookup for the same section/key * in 'section-two'. * - * @note This has only an effect on single value lookups. Enumerators for - * sections and key/value-pairs are not affected. The reason is that it is - * rather tricky to implement such a merge without requiring allocations for - * each lookup. For instance, if charon.tls has libtls as fallback and - * charon has libstrongswan as fallback, the key/value-enumerator for - * charon.tls had to enumerate the libtls and libstrongswan.tls sections - * too, but it would have to keep track of the already enumerated keys. + * @note Lookups are depth-first and currently strictly top-down. + * For instance, if app.sec had lib1.sec as fallback and lib1 had lib2 as + * fallback the keys/sections in lib2.sec would not be considered. But if + * app had lib3 as fallback the contents of lib3.sec would (as app is passed + * during the initial lookup). In the last example the order during + * enumerations would be app.sec, lib1.sec, lib3.sec. * * @note Additional arguments will be applied to both section format * strings so they must be compatible. |