Kea  2.1.7-git
hooks.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2022 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef HOOKS_H
8 #define HOOKS_H
9 
10 #include <hooks/callout_handle.h>
11 #include <hooks/library_handle.h>
12 
13 namespace {
14 
15 // Version 20106 of the hooks framework, set for Kea 2.1.6
16 const int KEA_HOOKS_VERSION = 20106;
17 
18 // Names of the framework functions.
19 const char* const LOAD_FUNCTION_NAME = "load";
20 const char* const UNLOAD_FUNCTION_NAME = "unload";
21 const char* const VERSION_FUNCTION_NAME = "version";
22 const char* const MULTI_THREADING_COMPATIBLE_FUNCTION_NAME =
23  "multi_threading_compatible";
24 
25 // Typedefs for pointers to the framework functions.
26 typedef int (*version_function_ptr)();
27 typedef int (*load_function_ptr)(isc::hooks::LibraryHandle&);
28 typedef int (*unload_function_ptr)();
29 typedef int (*multi_threading_compatible_function_ptr)();
30 
31 } // Anonymous namespace
32 
33 namespace isc {
34 namespace hooks {
35 
65 
66 void hooksStaticLinkInit();
67 
68 } // namespace hooks
69 } // namespace isc
70 
71 #endif // HOOKS_H
void hooksStaticLinkInit()
User-Library Initialization for Statically-Linked Kea.
Defines the logger used by the top-level component of kea-lfc.