summaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
authorvenaas <venaas>2008-08-22 14:32:51 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-08-22 14:32:51 +0000
commit5ffb1376dd0a2f1f55cfc0511bd3ef38be6e4d1d (patch)
treebab6ad90524920aa261874308abee56ffda4a178 /hash.h
parenta2a0f702e632d9219628fc467e1d2e5bde2eab7d (diff)
fixed bug with multiple status server sent, some dtls fixes
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@358 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/hash.h b/hash.h
index dbf9543..33ca042 100644
--- a/hash.h
+++ b/hash.h
@@ -13,6 +13,13 @@ struct hash {
pthread_mutex_t mutex;
};
+struct hash_entry {
+ void *key;
+ uint32_t keylen;
+ void *data;
+ struct list_node *next; /* used when walking through hash */
+};
+
/* allocates and initialises hash structure; returns NULL if malloc fails */
struct hash *hash_create();
@@ -27,3 +34,9 @@ void *hash_read(struct hash *hash, void *key, uint32_t keylen);
/* extracts (read and remove) entry from hash */
void *hash_extract(struct hash *hash, void *key, uint32_t keylen);
+
+/* returns first entry */
+struct hash_entry *hash_first(struct hash *hash);
+
+/* returns the next entry after the argument */
+struct hash_entry *hash_next(struct hash_entry *entry);