From f5f56e1a1c4d9e9496fcb9d81131066a964ccd23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:15:43 +0200 Subject: Adding upstream version 2.4.1. Signed-off-by: Daniel Baumann --- src/lib/util/util.dox | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/lib/util/util.dox (limited to 'src/lib/util/util.dox') diff --git a/src/lib/util/util.dox b/src/lib/util/util.dox new file mode 100644 index 0000000..94769a1 --- /dev/null +++ b/src/lib/util/util.dox @@ -0,0 +1,93 @@ +// Copyright (C) 2020-2021 Internet Systems Consortium, Inc. ("ISC") +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +/** + @page libutil libkea-util - Kea Utilities Library + +@section utilUtilities Utilities + +The utilities library (libkea-util) provides generic and Kea utilities: + + - boost time: boost Posix time and duration to text conversions. + + - buffer (header only): input and output buffers. + + - csv file: comma-separated values (CSV) files. + + - double: test utility for checking double equivalence (vs. strict + equality). + + - encode: base16, base32, base64 and hexadecimal conversions. + + - filename: filename manipulation (avoid dependency on boost). + + - hash: Fowler-Noll-Vo 64 bit hash function. + + - io: test utils for file descriptors and sockets. + + - io utilities (header only): reads and writes integers from / to buffers. + + - labeled values: labeled constants and label constant sets. + + - multi threading manager (in the util library to be available in the + whole Kea code). + + - optional: optional values. + + - pid file: process id files. + + - pointer util: test utility to compare smart pointers. + + - process spawn. + + - range utilities. + + - read-write mutex (header only). + + - signal set: signal handling (please use @c isc::asiolink::IOSignalSet + instead). + + - staged values. + + - state model: event-driven deterministic finite state machine. + + - stop watch: to measure code execution time. + + - string util: various string common tools. + + - thread pool. + + - time utilities: DNSSEC time conversions from and to text. + + - unittests (directory): tools for google test unit tests. + + - unlock guard: RAII helper to unlock a mutex in a limited scope. + + - versioned csv file: csv files with multiple versions of file schema. + + - watched socket (required as select() or poll() do not support condition + variables). + + - watched threads: threads using ready, error and terminate watched socket. + +@section utilMTConsiderations Multi-Threading Consideration for Utilities + +By default utilities are not thread safe, for instance CSV files and +qid random generators are not thread safe. Exceptions are: + + - multi threading manager is thread safe. + + - read-write mutex is thread safe. + + - state model is thread safe. + + - thread pool is thread safe. + + - unlock guard is thread safe. + + - watched threads are thread safe. + +*/ -- cgit v1.2.3