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