Import bind 9.5.2 vendor sources.
[dragonfly.git] / contrib / bind-9.5.2 / lib / isc / include / isc / bufferlist.h
blob54e00c76f619be07f6717853edcf7c10739d3e37
1 /*
2 * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or 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.
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.
18 /* $Id: bufferlist.h,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
20 #ifndef ISC_BUFFERLIST_H
21 #define ISC_BUFFERLIST_H 1
23 /*****
24 ***** Module Info
25 *****/
27 /*! \file isc/bufferlist.h
30 *\brief Buffer lists have no synchronization. Clients must ensure exclusive
31 * access.
33 * \li Reliability:
34 * No anticipated impact.
36 * \li Security:
37 * No anticipated impact.
39 * \li Standards:
40 * None.
43 /***
44 *** Imports
45 ***/
47 #include <isc/lang.h>
48 #include <isc/types.h>
50 ISC_LANG_BEGINDECLS
52 /***
53 *** Functions
54 ***/
56 unsigned int
57 isc_bufferlist_usedcount(isc_bufferlist_t *bl);
58 /*!<
59 * \brief Return the length of the sum of all used regions of all buffers in
60 * the buffer list 'bl'
62 * Requires:
64 *\li 'bl' is not NULL.
66 * Returns:
67 *\li sum of all used regions' lengths.
70 unsigned int
71 isc_bufferlist_availablecount(isc_bufferlist_t *bl);
72 /*!<
73 * \brief Return the length of the sum of all available regions of all buffers in
74 * the buffer list 'bl'
76 * Requires:
78 *\li 'bl' is not NULL.
80 * Returns:
81 *\li sum of all available regions' lengths.
84 ISC_LANG_ENDDECLS
86 #endif /* ISC_BUFFERLIST_H */