summaryrefslogtreecommitdiffstats
path: root/src/lib/util/util.dox
blob: 94769a19df75976199f46754c3b45b38b7e1a733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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.

*/