X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=hash.h;h=48f54a3353deb5e6a5f6358edaba04a7e549e205;hb=68d851156019f743618b39d31f7674981ed18a71;hp=dbf954367c7e0b870e5f7d7fec91993447fcc568;hpb=a2a0f702e632d9219628fc467e1d2e5bde2eab7d;p=libradsec.git diff --git a/hash.h b/hash.h index dbf9543..48f54a3 100644 --- a/hash.h +++ b/hash.h @@ -6,13 +6,22 @@ * copyright notice and this permission notice appear in all copies. */ +#ifndef SYS_SOLARIS9 #include +#endif struct hash { struct list *hashlist; 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 +36,13 @@ 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); + +/* Local Variables: */ +/* c-file-style: "stroustrup" */ +/* End: */