1258945Sroberto/*
2258945Sroberto * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
3258945Sroberto * Copyright (C) 1999-2001  Internet Software Consortium.
4258945Sroberto *
5258945Sroberto * Permission to use, copy, modify, and/or distribute this software for any
6258945Sroberto * purpose with or without fee is hereby granted, provided that the above
7258945Sroberto * copyright notice and this permission notice appear in all copies.
8258945Sroberto *
9258945Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10258945Sroberto * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11258945Sroberto * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12258945Sroberto * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13258945Sroberto * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14258945Sroberto * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15258945Sroberto * PERFORMANCE OF THIS SOFTWARE.
16258945Sroberto */
17258945Sroberto
18258945Sroberto/* $Id: bufferlist.h,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
19258945Sroberto
20258945Sroberto#ifndef ISC_BUFFERLIST_H
21258945Sroberto#define ISC_BUFFERLIST_H 1
22258945Sroberto
23258945Sroberto/*****
24258945Sroberto ***** Module Info
25258945Sroberto *****/
26258945Sroberto
27258945Sroberto/*! \file isc/bufferlist.h
28258945Sroberto *
29258945Sroberto *
30258945Sroberto *\brief	Buffer lists have no synchronization.  Clients must ensure exclusive
31258945Sroberto *	access.
32258945Sroberto *
33258945Sroberto * \li Reliability:
34258945Sroberto *	No anticipated impact.
35258945Sroberto
36258945Sroberto * \li Security:
37258945Sroberto *	No anticipated impact.
38258945Sroberto *
39258945Sroberto * \li Standards:
40258945Sroberto *	None.
41258945Sroberto */
42258945Sroberto
43258945Sroberto/***
44258945Sroberto *** Imports
45258945Sroberto ***/
46258945Sroberto
47258945Sroberto#include <isc/lang.h>
48258945Sroberto#include <isc/types.h>
49258945Sroberto
50258945SrobertoISC_LANG_BEGINDECLS
51258945Sroberto
52258945Sroberto/***
53258945Sroberto *** Functions
54258945Sroberto ***/
55258945Sroberto
56258945Srobertounsigned int
57258945Srobertoisc_bufferlist_usedcount(isc_bufferlist_t *bl);
58258945Sroberto/*!<
59258945Sroberto * \brief Return the length of the sum of all used regions of all buffers in
60258945Sroberto * the buffer list 'bl'
61258945Sroberto *
62258945Sroberto * Requires:
63258945Sroberto *
64258945Sroberto *\li	'bl' is not NULL.
65258945Sroberto *
66258945Sroberto * Returns:
67258945Sroberto *\li	sum of all used regions' lengths.
68258945Sroberto */
69258945Sroberto
70258945Srobertounsigned int
71258945Srobertoisc_bufferlist_availablecount(isc_bufferlist_t *bl);
72258945Sroberto/*!<
73258945Sroberto * \brief Return the length of the sum of all available regions of all buffers in
74258945Sroberto * the buffer list 'bl'
75258945Sroberto *
76258945Sroberto * Requires:
77258945Sroberto *
78258945Sroberto *\li	'bl' is not NULL.
79258945Sroberto *
80258945Sroberto * Returns:
81258945Sroberto *\li	sum of all available regions' lengths.
82258945Sroberto */
83258945Sroberto
84258945SrobertoISC_LANG_ENDDECLS
85258945Sroberto
86258945Sroberto#endif /* ISC_BUFFERLIST_H */
87