blob: 7cf3323cf544778a62efc7d1648387f981c8064e [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 Vasko0d81c572022-09-26 10:39:31 +02008 * Copyright (c) 2015 - 2022 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/*
38 * Support for crypt.h
39 */
40#cmakedefine HAVE_CRYPT
41
42/*
Michal Vasko0d81c572022-09-26 10:39:31 +020043 * Support for keyboard-interactive SSH authentication method
44 */
45#cmakedefine HAVE_LIBPAM
46
47/*
Michal Vasko80227222022-12-12 09:05:24 +010048 * Location of installed YANG modules on the system
Radek Krejci14b14032015-10-21 15:19:43 +020049 */
romanc1d2b092023-02-02 08:58:27 +010050#define NC_SERVER_SEARCH_DIR "@YANG_MODULE_DIR@"
51
52/*
53 * Location of installed YANG modules on the system
54 */
Michal Vasko80227222022-12-12 09:05:24 +010055#define NC_CLIENT_SEARCH_DIR "@CLIENT_SEARCH_DIR@"
Radek Krejci14b14032015-10-21 15:19:43 +020056
Michal Vasko6b7c42e2016-03-02 15:46:41 +010057/*
Michal Vaskof471fa02017-02-15 10:48:12 +010058 * Inactive read timeout
Michal Vasko6b7c42e2016-03-02 15:46:41 +010059 */
Michal Vaskof471fa02017-02-15 10:48:12 +010060#define NC_READ_INACT_TIMEOUT @READ_INACTIVE_TIMEOUT@
61
62/*
63 * Active read timeout in seconds
64 * (also used for internal <get-schema> RPC reply timeout)
65 */
66#define NC_READ_ACT_TIMEOUT @READ_ACTIVE_TIMEOUT@
Michal Vasko6b7c42e2016-03-02 15:46:41 +010067
Michal Vaskoafdb8ec2017-02-15 11:25:36 +010068/*
69 * pspoll structure queue size (also found in nc_server.h)
70 */
71#define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
72
Michal Vasko5a9bd9c2019-08-16 15:50:09 +020073/* Microseconds after which tasks are repeated until the full timeout elapses.
74 * A millisecond (1000) should be divisible by this number without remain.
75 */
76#define NC_TIMEOUT_STEP @TIMEOUT_STEP@
77
Rosen Penevef2f3ac2019-07-15 18:15:28 -070078/* Portability feature-check macros. */
79#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
80
Radek Krejcid0d19522015-09-02 13:49:25 +020081#endif /* NC_CONFIG_H_ */