]> git.ipfire.org Git - thirdparty/bird.git/blame - lib/idm.h
Add mock-up function for unit tests
[thirdparty/bird.git] / lib / idm.h
CommitLineData
74c838a8
OZ
1/*
2 * BIRD Library -- ID Map
3 *
4 * (c) 2013--2015 Ondrej Zajicek <santiago@crfreenet.org>
5 * (c) 2013--2015 CZ.NIC z.s.p.o.
6 *
7 * Can be freely distributed and used under the terms of the GNU GPL.
8 */
9
10#ifndef _BIRD_IDM_H_
11#define _BIRD_IDM_H_
12
13struct idm
14{
15 u32 *data;
16 u32 pos;
17 u32 used;
18 u32 size;
19};
20
21void idm_init(struct idm *m, pool *p, uint size);
22u32 idm_alloc(struct idm *m);
23void idm_free(struct idm *m, u32 id);
24
25#endif