diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-06-07 14:44:52 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-06-11 11:18:17 +0200 |
commit | 8a6cc1e35f95d58ea72d2b07065d93d586e2d19c (patch) | |
tree | 46cae882041f2d5cf3ffea96b60f02338834822a /src/libstrongswan/plugins/plugin_feature.h | |
parent | 270e425b2460989bdd9f9e7580ff98bc4d7861f6 (diff) | |
download | strongswan-8a6cc1e35f95d58ea72d2b07065d93d586e2d19c.tar.bz2 strongswan-8a6cc1e35f95d58ea72d2b07065d93d586e2d19c.tar.xz |
plugin-feature: Function added to exactly compare plugin features
Diffstat (limited to 'src/libstrongswan/plugins/plugin_feature.h')
-rw-r--r-- | src/libstrongswan/plugins/plugin_feature.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/plugin_feature.h b/src/libstrongswan/plugins/plugin_feature.h index 7667fff3e..0f29bf69e 100644 --- a/src/libstrongswan/plugins/plugin_feature.h +++ b/src/libstrongswan/plugins/plugin_feature.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Tobias Brunner + * Copyright (C) 2012-2013 Tobias Brunner * Hochschule fuer Technik Rapperswil * * Copyright (C) 2011 Martin Willi @@ -340,6 +340,10 @@ u_int32_t plugin_feature_hash(plugin_feature_t *feature); /** * Check if feature a matches to feature b. * + * This is no check for equality. For instance, for FEATURE_RNG a matches b if + * a's strength is at least the strength of b. Or for FEATURE_SQL if a is + * DB_ANY it will match b if it is of the same type. + * * @param a feature to check * @param b feature to match against * @return TRUE if a matches b @@ -347,6 +351,15 @@ u_int32_t plugin_feature_hash(plugin_feature_t *feature); bool plugin_feature_matches(plugin_feature_t *a, plugin_feature_t *b); /** + * Check if feature a equals feature b. + * + * @param a feature + * @param b feature to compare + * @return TRUE if a equals b + */ +bool plugin_feature_equals(plugin_feature_t *a, plugin_feature_t *b); + +/** * Get a string describing feature. * * @param feature feature to describe |