blob: d366e0d94d2ec5ba9d1814b0ecaebae632e2b7f1 [file] [log] [blame]
Radek Krejcid0d19522015-09-02 13:49:25 +02001/**
Michal Vasko95ea9ff2021-11-09 12:29:14 +01002 * @file config.h
3 * @author Radek Krejci <rkrejci@cesnet.cz>
Michal Vasko0d81c572022-09-26 10:39:31 +02004 * @author Michal Vasko <mvasko@cesnet.cz>
Michal Vasko95ea9ff2021-11-09 12:29:14 +01005 * @brief libnetconf2 various configuration settings.
Radek Krejcid0d19522015-09-02 13:49:25 +02006 *
Michal Vasko95ea9ff2021-11-09 12:29:14 +01007 * @copyright
Michal Vasko487ab802024-04-26 12:20:29 +02008 * Copyright (c) 2015 - 2024 CESNET, z.s.p.o.
Radek Krejcid0d19522015-09-02 13:49:25 +02009 *
Radek Krejci9b81f5b2016-02-24 13:14:49 +010010 * This source code is licensed under BSD 3-Clause License (the "License").
11 * You may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
Michal Vaskoafd416b2016-02-25 14:51:46 +010013 *
Radek Krejci9b81f5b2016-02-24 13:14:49 +010014 * https://opensource.org/licenses/BSD-3-Clause
Radek Krejcid0d19522015-09-02 13:49:25 +020015 */
16
17#ifndef NC_CONFIG_H_
18#define NC_CONFIG_H_
19
20/*
David Sedlákaae4df32018-10-08 22:27:22 +020021 * Mark all objects as hidden and export only objects explicitly marked to be part of the public API or
22 * those marked as mock objects for testing purpose
Radek Krejcid0d19522015-09-02 13:49:25 +020023 */
24#define API __attribute__((visibility("default")))
David Sedlákddde4492018-09-30 21:34:38 +020025#define MOCK __attribute__((visibility("default")))
26
Radek Krejci14b14032015-10-21 15:19:43 +020027/*
apropp-molex4e903c32020-04-20 03:06:58 -040028 * Support for getpeereid
29 */
30#cmakedefine HAVE_GETPEEREID
31
32/*
33 * Support for shadow file manipulation
34 */
35#cmakedefine HAVE_SHADOW
36
37/*
Michal Vasko487ab802024-04-26 12:20:29 +020038 * Support for terminal in/out
39 */
40#cmakedefine HAVE_TERMIOS
41
42/*
Michal Vasko0d81c572022-09-26 10:39:31 +020043 * Support for keyboard-interactive SSH authentication method
44 */
45#cmakedefine HAVE_LIBPAM
46
47/*
roman4562d662024-04-05 12:27:30 +020048 * Use MbedTLS as TLS back-end
49 */
roman25263e92024-05-13 15:43:32 +020050#cmakedefine HAVE_MBEDTLS
roman4562d662024-04-05 12:27:30 +020051
52/*
Michal Vasko80227222022-12-12 09:05:24 +010053 * Location of installed YANG modules on the system
Radek Krejci14b14032015-10-21 15:19:43 +020054 */
romanc1d2b092023-02-02 08:58:27 +010055#define NC_SERVER_SEARCH_DIR "@YANG_MODULE_DIR@"
56
57/*
58 * Location of installed YANG modules on the system
59 */
Michal Vasko80227222022-12-12 09:05:24 +010060#define NC_CLIENT_SEARCH_DIR "@CLIENT_SEARCH_DIR@"
Radek Krejci14b14032015-10-21 15:19:43 +020061
Michal Vasko6b7c42e2016-03-02 15:46:41 +010062/*
Michal Vaskof471fa02017-02-15 10:48:12 +010063 * Inactive read timeout
Michal Vasko6b7c42e2016-03-02 15:46:41 +010064 */
Michal Vaskof471fa02017-02-15 10:48:12 +010065#define NC_READ_INACT_TIMEOUT @READ_INACTIVE_TIMEOUT@
66
67/*
68 * Active read timeout in seconds
69 * (also used for internal <get-schema> RPC reply timeout)
70 */
71#define NC_READ_ACT_TIMEOUT @READ_ACTIVE_TIMEOUT@
Michal Vasko6b7c42e2016-03-02 15:46:41 +010072
Michal Vaskoafdb8ec2017-02-15 11:25:36 +010073/*
74 * pspoll structure queue size (also found in nc_server.h)
75 */
76#define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
77
Michal Vasko5a9bd9c2019-08-16 15:50:09 +020078/* Microseconds after which tasks are repeated until the full timeout elapses.
79 * A millisecond (1000) should be divisible by this number without remain.
80 */
81#define NC_TIMEOUT_STEP @TIMEOUT_STEP@
82
Rosen Penevef2f3ac2019-07-15 18:15:28 -070083/* Portability feature-check macros. */
84#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
85
Radek Krejcid0d19522015-09-02 13:49:25 +020086#endif /* NC_CONFIG_H_ */