aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/plugin_feature.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-05-23 17:37:53 +0200
committerTobias Brunner <tobias@strongswan.org>2012-05-23 17:50:05 +0200
commita9cfd29c10c7a9c16167023c9470255eb1eecbb4 (patch)
tree9bb0d80e48b702e48900bb9f0c882f12d6208ad1 /src/libstrongswan/plugins/plugin_feature.h
parent31c83b973e2081c791b5ef1391913135660ca6b8 (diff)
downloadstrongswan-a9cfd29c10c7a9c16167023c9470255eb1eecbb4.tar.bz2
strongswan-a9cfd29c10c7a9c16167023c9470255eb1eecbb4.tar.xz
Hash function for plugin features added.
Diffstat (limited to 'src/libstrongswan/plugins/plugin_feature.h')
-rw-r--r--src/libstrongswan/plugins/plugin_feature.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/plugin_feature.h b/src/libstrongswan/plugins/plugin_feature.h
index 25a58a4b5..10a316e4a 100644
--- a/src/libstrongswan/plugins/plugin_feature.h
+++ b/src/libstrongswan/plugins/plugin_feature.h
@@ -1,4 +1,7 @@
/*
+ * Copyright (C) 2012 Tobias Brunner
+ * Hochschule fuer Technik Rapperswil
+ *
* Copyright (C) 2011 Martin Willi
* Copyright (C) 2011 revosec AG
*
@@ -304,6 +307,18 @@ struct plugin_feature_t {
extern enum_name_t *plugin_feature_names;
/**
+ * Calculates a hash value for the given feature.
+ *
+ * Since this is intended to be used with the plugin_features_matches function
+ * the hash is not really unique for all types of features (e.g. RNGs are all
+ * mapped to the same value because they are loosely matched by said function).
+ *
+ * @param feature feature to hash
+ * @return hash value of the feature
+ */
+u_int32_t plugin_feature_hash(plugin_feature_t *feature);
+
+/**
* Check if feature a matches to feature b.
*
* @param a feature to check