+
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_replace_ext
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_hash_table_replace_ext(SilcHashTable ht, void *key,
+ * void *context,
+ * SilcHashFunction hash,
+ * void *hash_user_context);
+ *
+ * DESCRIPTION
+ *
+ * Same as silc_hash_table_add_ext but if the `key' already exists in the
+ * hash table the old key and the old context will be replaced with the
+ * `key' and the `context. The destructor function will be called for the
+ * replaced key and context.
+ *
+ * The `hash' and `hash_user_context' are application specified hash
+ * function. If not provided the hash table's default is used.
+ *
+ ***/
+SilcBool silc_hash_table_replace_ext(SilcHashTable ht,
+ void *key, void *context,
+ SilcHashFunction hash,
+ void *hash_user_context);
+
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_del_ext
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_hash_table_del_ext(SilcHashTable ht, void *key,
+ * SilcHashFunction hash,
+ * void *hash_user_context,
+ * SilcHashCompare compare,
+ * void *compare_user_context,
+ * SilcHashDestructor destructor,
+ * void *destructor_user_context);
+ *
+ * DESCRIPTION
+ *
+ * Removes the entry from the hash table by the provided `key'. This will
+ * call the destructor funtion for the found entry. Return TRUE if the
+ * entry was removed successfully and FALSE otherwise.
+ *
+ * The `hash' and `hash_user_context' are application specified hash
+ * function. If not provided the hash table's default is used.
+ * The `compare' and `compare_user_context' are application specified
+ * comparing function. If not provided the hash table's default is used.
+ * The `destructor' and `destructor_user_context' are application
+ * specific destructor function.
+ *
+ ***/
+SilcBool silc_hash_table_del_ext(SilcHashTable ht, void *key,
+ SilcHashFunction hash,
+ void *hash_user_context,
+ SilcHashCompare compare,
+ void *compare_user_context,
+ SilcHashDestructor destructor,
+ void *destructor_user_context);
+
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_del_by_context_ext
+ *
+ * SYNOPSIS
+ *
+ * SilcBool
+ * silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key,
+ * void *context,
+ * SilcHashFunction hash,
+ * void *hash_user_context,
+ * SilcHashCompare compare,
+ * void *compare_user_context,
+ * SilcHashDestructor destructor,
+ * void *destructor_user_context);
+ *
+ * DESCRIPTION
+ *
+ * Same as silc_hash_table_del but verifies that the context associated
+ * with the `key' matches the `context'. This is handy to use with hash
+ * tables that may have duplicate keys. In that case the `context' may
+ * be used to check whether the correct entry is being deleted.
+ *
+ * The `hash' and `hash_user_context' are application specified hash
+ * function. If not provided the hash table's default is used.
+ * The `compare' and `compare_user_context' are application specified
+ * comparing function. If not provided the hash table's default is used.
+ * The `destructor' and `destructor_user_context' are application
+ * specific destructor function.
+ *
+ ***/
+SilcBool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key,
+ void *context,
+ SilcHashFunction hash,
+ void *hash_user_context,
+ SilcHashCompare compare,
+ void *compare_user_context,
+ SilcHashDestructor destructor,
+ void *destructor_user_context);
+
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_find_ext
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_hash_table_find_ext(SilcHashTable ht, void *key,
+ * void **ret_key, void **ret_context,
+ * SilcHashFunction hash,
+ * void *hash_user_context,
+ * SilcHashCompare compare,
+ * void *compare_user_context);
+ *
+ * DESCRIPTION
+ *
+ * Finds the entry in the hash table by the provided `key' as fast as
+ * possible. Return TRUE if the entry was found and FALSE otherwise.
+ * The found entry is returned to the `ret_key' and `ret_context',
+ * respectively. If the `ret_key and `ret_context' are NULL then this
+ * maybe used only to check whether given key exists in the table.
+ *
+ * The `hash' and `hash_user_context' are application specified hash
+ * function. If not provided the hash table's default is used.
+ * The `compare' and `compare_user_context' are application specified
+ * comparing function. If not provided the hash table's default is used.
+ *
+ ***/
+SilcBool silc_hash_table_find_ext(SilcHashTable ht, void *key,
+ void **ret_key, void **ret_context,
+ SilcHashFunction hash,
+ void *hash_user_context,
+ SilcHashCompare compare,
+ void *compare_user_context);
+
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_find_by_context_ext
+ *
+ * SYNOPSIS
+ *
+ * SilcBool
+ * silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key,
+ * void *context, void **ret_key,
+ * SilcHashFunction hash,
+ * void *hash_user_context,
+ * SilcHashCompare compare,
+ * void *compare_user_context);
+ *
+ * DESCRIPTION
+ *
+ * Finds the entry in the hash table by the provided `key' and
+ * `context' as fast as possible. This is handy function when there
+ * can be multiple same keys in the hash table. By using this function
+ * the specific key with specific context can be found. Return
+ * TRUE if the entry with the key and context was found and FALSE
+ * otherwise. The function returns only the key to `ret_key' since
+ * the caller already knows the context.
+ *
+ * The `hash' and `hash_user_context' are application specified hash
+ * function. If not provided the hash table's default is used.
+ * The `compare' and `compare_user_context' are application specified
+ * comparing function. If not provided the hash table's default is used.
+ *
+ ***/
+SilcBool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key,
+ void *context, void **ret_key,
+ SilcHashFunction hash,
+ void *hash_user_context,
+ SilcHashCompare compare,
+ void *compare_user_context);
+
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_find_foreach_ext
+ *
+ * SYNOPSIS
+ *
+ * void silc_hash_table_find_foreach_ext(SilcHashTable ht, void *key,
+ * SilcHashFunction hash,
+ * void *hash_user_context,
+ * SilcHashCompare compare,
+ * void *compare_user_context,
+ * SilcHashForeach foreach,
+ * void *foreach_user_context);
+ *
+ * DESCRIPTION
+ *
+ * As the hash table is collision resistant it is possible to save duplicate
+ * keys to the hash table. This function can be used to find all keys
+ * and contexts from the hash table that are found using the `key'. The
+ * `foreach' is called for every found key. If no entries can be found
+ * the `foreach' will be called once with the context set NULL and
+ * `key' and `user_context' sent to the function.
+ *
+ * The `hash' and `hash_user_context' are application specified hash
+ * function. If not provided the hash table's default is used.
+ * The `compare' and `compare_user_context' are application specified
+ * comparing function. If not provided the hash table's default is used.
+ *
+ * NOTES
+ *
+ * The hash table will not be rehashed during the traversing of the table,
+ * even if the table was marked as auto rehashable. The caller also must
+ * not call silc_hash_table_rehash while traversing the table.
+ *
+ ***/