X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=src%2Fheaders%2Fhash_op.h;h=9b0777a4b64bec2e5e79282c38dcb85dfd2bbbd7;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hp=fd3d842522d044a0f746fee8414a92fd12119d6b;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/headers/hash_op.h b/src/headers/hash_op.h index fd3d842..9b0777a 100755 --- a/src/headers/hash_op.h +++ b/src/headers/hash_op.h @@ -1,19 +1,20 @@ -/* @(#) $Id: hash_op.h,v 1.4 2009/06/24 17:06:26 dcid Exp $ */ +/* @(#) $Id: ./src/headers/hash_op.h, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation. * * License details at the LICENSE file included with OSSEC or * online at: http://www.ossec.net/en/licensing.html */ - + /* Common API for dealing with directory trees */ - + #ifndef _OS_HASHOP #define _OS_HASHOP @@ -23,9 +24,9 @@ typedef struct _OSHashNode { struct _OSHashNode *next; - + void *key; - void *data; + void *data; }OSHashNode; @@ -34,7 +35,7 @@ typedef struct _OSHash unsigned int rows; unsigned int initial_seed; unsigned int constant; - + OSHashNode **table; }OSHash; @@ -54,7 +55,7 @@ OSHash *OSHash_Create(); * Frees the memory used by the hash. */ void *OSHash_Free(OSHash *self); - + /** void OSHash_Add(OSHash *hash, char *key, void *data) @@ -64,6 +65,7 @@ void *OSHash_Free(OSHash *self); * Key must not be NULL. */ int OSHash_Add(OSHash *hash, char *key, void *data); +int OSHash_Update(OSHash *hash, char *key, void *data); /** void *OSHash_Get(OSHash *self, char *key) @@ -73,6 +75,7 @@ int OSHash_Add(OSHash *hash, char *key, void *data); */ void *OSHash_Get(OSHash *self, char *key); +int OSHash_setSize(OSHash *self, int new_size); #endif