KCC: docstring for test_all_reps_from()
[Samba.git] / lib / util / idtree_random.h
blob4d3b61c33d594ebab0de161e932c0d6005224f2f
1 /*
2 Unix SMB/CIFS implementation.
4 very efficient functions to manage mapping a id (such as a fnum) to
5 a pointer. This is used for fnum and search id allocation.
7 Copyright (C) Andrew Tridgell 2004
9 This code is derived from lib/idr.c in the 2.6 Linux kernel, which was
10 written by Jim Houston jim.houston@ccur.com, and is
11 Copyright (C) 2002 by Concurrent Computer Corporation
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
27 #ifndef _SAMBA_IDTREE_RANDOM_H_
28 #define _SAMBA_IDTREE_RANDOM_H_
30 #include <talloc.h>
31 #include "idtree.h"
33 /**
34 allocate a new id randomly in the given range
36 int idr_get_new_random(struct idr_context *idp, void *ptr, int limit);
38 #endif /* _SAMBA_IDTREE_RANDOM_H_ */