ROHC compression/decompression library
hashtable_cr.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Viveris Technologies
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /**
20  * @file hashtable_cr.h
21  * @brief Efficient, secure hash table
22  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
23  */
24 
25 #ifndef ROHC_HASHTABLE_CR_H
26 #define ROHC_HASHTABLE_CR_H
27 
28 #include "hashtable.h"
29 
30 #include <stddef.h>
31 #include <stdbool.h>
32 #include <stdint.h>
33 
34 bool hashtable_cr_new(struct hashtable *const hashtable,
35  const size_t key_len,
36  const size_t full_key_len,
37  const size_t size)
38  __attribute((warn_unused_result, nonnull(1)));
39 
40 void hashtable_cr_free(struct hashtable *const hashtable)
41  __attribute((nonnull(1)));
42 
43 void hashtable_cr_add(struct hashtable *const hashtable,
44  const void *const key,
45  void *const elem)
46  __attribute((nonnull(1, 2, 3)));
47 
48 void * hashtable_cr_get_first(const struct hashtable *const hashtable,
49  const void *const key)
50  __attribute((warn_unused_result, nonnull(1, 2)));
51 
52 void * hashtable_cr_get_next(const struct hashtable *const hashtable,
53  const void *const key,
54  void *const pos)
55  __attribute((warn_unused_result, nonnull(1, 2, 3)));
56 
57 void hashtable_cr_del(struct hashtable *const hashtable,
58  const void *const key)
59  __attribute((nonnull(1, 2)));
60 
61 #endif
62 
void * hashtable_cr_get_next(const struct hashtable *const hashtable, const void *const key, void *const pos) __attribute((warn_unused_result
void hashtable_cr_del(struct hashtable *const hashtable, const void *const key) __attribute((nonnull(1
uint8_t key[]
Definition: hashtable.h:40
void hashtable_cr_add(struct hashtable *const hashtable, const void *const key, void *const elem) __attribute((nonnull(1
bool hashtable_cr_new(struct hashtable *const hashtable, const size_t key_len, const size_t full_key_len, const size_t size) __attribute((warn_unused_result
bool nonnull(1)))
void hashtable_cr_free(struct hashtable *const hashtable) __attribute((nonnull(1)))
Definition: hashtable_cr.c:53
Definition: hashtable.h:45
Efficient, secure hash table.
void void * hashtable_cr_get_first(const struct hashtable *const hashtable, const void *const key) __attribute((warn_unused_result