Hash function for plugin features added.

This commit is contained in:
Tobias Brunner
2012-05-23 17:50:05 +02:00
parent 31c83b973e
commit a9cfd29c10
2 changed files with 68 additions and 0 deletions
@@ -1,4 +1,7 @@
/*
* Copyright (C) 2012 Tobias Brunner
* Hochschule fuer Technik Rapperswil
*
* Copyright (C) 2011 Martin Willi
* Copyright (C) 2011 revosec AG
*
@@ -303,6 +306,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.
*