aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-20 01:48:05 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-20 01:48:05 +0000
commitda9d5ccfdada2b7f306b3da047b1871e117ac5fe (patch)
treefb7c828a6096626b8aaeab75a73e579e1225a97e /src/common
parentb0ef4e1143619e0beb2388f523c7dce39d5bc6ed (diff)
downloadtor-da9d5ccfdada2b7f306b3da047b1871e117ac5fe.tar
tor-da9d5ccfdada2b7f306b3da047b1871e117ac5fe.tar.gz
Add initial history-tracking backend code for reputation module. Not called or tested yet.
svn:r1310
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 5bdcaed96..46792b84b 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -41,6 +41,7 @@ void *tor_realloc(void *ptr, size_t size);
char *tor_strdup(const char *s);
char *tor_strndup(const char *s, size_t n);
#define tor_free(p) do {if(p) {free(p); (p)=NULL;}} while(0)
+void tor_strlower(char *s);
typedef struct {
void **list;
@@ -66,9 +67,11 @@ strmap_t* strmap_new(void);
void* strmap_set(strmap_t *map, const char *key, void *val);
void* strmap_get(strmap_t *map, const char *key);
void* strmap_remove(strmap_t *map, const char *key);
-void strmap_foreach(strmap_t *map,
- void* (*fn)(const char *key, void *val, void *data),
- void *data);
+void* strmap_set_lc(strmap_t *map, const char *key, void *val);
+void* strmap_get_lc(strmap_t *map, const char *key);
+void* strmap_remove_lc(strmap_t *map, const char *key);
+typedef void* (*strmap_foreach_fn)(const char *key, void *val, void *data);
+void strmap_foreach(strmap_t *map, strmap_foreach_fn fn, void *data);
void strmap_free(strmap_t *map, void (*free_val)(void*));
strmap_iter_t *strmap_iter_init(strmap_t *map);