Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: counter.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef ISC_COUNTER_H
[11] Fix | Delete
#define ISC_COUNTER_H 1
[12] Fix | Delete
[13] Fix | Delete
/*****
[14] Fix | Delete
***** Module Info
[15] Fix | Delete
*****/
[16] Fix | Delete
[17] Fix | Delete
/*! \file isc/counter.h
[18] Fix | Delete
*
[19] Fix | Delete
* \brief The isc_counter_t object is a simplified version of the
[20] Fix | Delete
* isc_quota_t object; it tracks the consumption of limited
[21] Fix | Delete
* resources, returning an error condition when the quota is
[22] Fix | Delete
* exceeded. However, unlike isc_quota_t, attaching and detaching
[23] Fix | Delete
* from a counter object does not increment or decrement the counter.
[24] Fix | Delete
*/
[25] Fix | Delete
[26] Fix | Delete
/***
[27] Fix | Delete
*** Imports.
[28] Fix | Delete
***/
[29] Fix | Delete
[30] Fix | Delete
#include <isc/lang.h>
[31] Fix | Delete
#include <isc/mutex.h>
[32] Fix | Delete
#include <isc/types.h>
[33] Fix | Delete
[34] Fix | Delete
/*****
[35] Fix | Delete
***** Types.
[36] Fix | Delete
*****/
[37] Fix | Delete
[38] Fix | Delete
ISC_LANG_BEGINDECLS
[39] Fix | Delete
[40] Fix | Delete
isc_result_t
[41] Fix | Delete
isc_counter_create(isc_mem_t *mctx, int limit, isc_counter_t **counterp);
[42] Fix | Delete
/*%<
[43] Fix | Delete
* Allocate and initialize a counter object.
[44] Fix | Delete
*/
[45] Fix | Delete
[46] Fix | Delete
isc_result_t
[47] Fix | Delete
isc_counter_increment(isc_counter_t *counter);
[48] Fix | Delete
/*%<
[49] Fix | Delete
* Increment the counter.
[50] Fix | Delete
*
[51] Fix | Delete
* If the counter limit is nonzero and has been reached, then
[52] Fix | Delete
* return ISC_R_QUOTA, otherwise ISC_R_SUCCESS. (The counter is
[53] Fix | Delete
* incremented regardless of return value.)
[54] Fix | Delete
*/
[55] Fix | Delete
[56] Fix | Delete
unsigned int
[57] Fix | Delete
isc_counter_used(isc_counter_t *counter);
[58] Fix | Delete
/*%<
[59] Fix | Delete
* Return the current counter value.
[60] Fix | Delete
*/
[61] Fix | Delete
[62] Fix | Delete
void
[63] Fix | Delete
isc_counter_setlimit(isc_counter_t *counter, int limit);
[64] Fix | Delete
/*%<
[65] Fix | Delete
* Set the counter limit.
[66] Fix | Delete
*/
[67] Fix | Delete
[68] Fix | Delete
void
[69] Fix | Delete
isc_counter_attach(isc_counter_t *source, isc_counter_t **targetp);
[70] Fix | Delete
/*%<
[71] Fix | Delete
* Attach to a counter object, increasing its reference counter.
[72] Fix | Delete
*/
[73] Fix | Delete
[74] Fix | Delete
void
[75] Fix | Delete
isc_counter_detach(isc_counter_t **counterp);
[76] Fix | Delete
/*%<
[77] Fix | Delete
* Detach (and destroy if reference counter has dropped to zero)
[78] Fix | Delete
* a counter object.
[79] Fix | Delete
*/
[80] Fix | Delete
[81] Fix | Delete
ISC_LANG_ENDDECLS
[82] Fix | Delete
[83] Fix | Delete
#endif /* ISC_COUNTER_H */
[84] Fix | Delete
[85] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function