Merge from vendor branch HEIMDAL:
[dragonfly.git] / contrib / bind-9.2.4rc7 / lib / isc / include / isc / bufferlist.h
1 /*
2  * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 1999-2001  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  * PERFORMANCE OF THIS SOFTWARE.
16  */
17
18 /* $Id: bufferlist.h,v 1.10.2.1 2004/03/09 06:11:54 marka Exp $ */
19
20 #ifndef ISC_BUFFERLIST_H
21 #define ISC_BUFFERLIST_H 1
22
23 /*****
24  ***** Module Info
25  *****/
26
27 /*
28  * Buffer Lists
29  *
30  *      Buffer lists have no synchronization.  Clients must ensure exclusive
31  *      access.
32  *
33  * Reliability:
34  *      No anticipated impact.
35
36  * Security:
37  *      No anticipated impact.
38  *
39  * Standards:
40  *      None.
41  */
42
43 /***
44  *** Imports
45  ***/
46
47 #include <isc/lang.h>
48 #include <isc/types.h>
49
50 ISC_LANG_BEGINDECLS
51
52 /***
53  *** Functions
54  ***/
55
56 unsigned int
57 isc_bufferlist_usedcount(isc_bufferlist_t *bl);
58 /*
59  * Return the length of the sum of all used regions of all buffers in
60  * the buffer list 'bl'
61  *
62  * Requires:
63  *
64  *      'bl' is not NULL.
65  *
66  * Returns:
67  *      sum of all used regions' lengths.
68  */
69
70 unsigned int
71 isc_bufferlist_availablecount(isc_bufferlist_t *bl);
72 /*
73  * Return the length of the sum of all available regions of all buffers in
74  * the buffer list 'bl'
75  *
76  * Requires:
77  *
78  *      'bl' is not NULL.
79  *
80  * Returns:
81  *      sum of all available regions' lengths.
82  */
83
84 ISC_LANG_ENDDECLS
85
86 #endif /* ISC_BUFFERLIST_H */