blob: 340181e1df209e3ab7117c6ecf1d8ce93cfb2aa5 [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>
4 * @brief libnetconf2 various configuration settings.
Radek Krejcid0d19522015-09-02 13:49:25 +02005 *
Michal Vasko95ea9ff2021-11-09 12:29:14 +01006 * @copyright
Michal Vaskof471fa02017-02-15 10:48:12 +01007 * Copyright (c) 2015 - 2017 CESNET, z.s.p.o.
Radek Krejcid0d19522015-09-02 13:49:25 +02008 *
Radek Krejci9b81f5b2016-02-24 13:14:49 +01009 * This source code is licensed under BSD 3-Clause License (the "License").
10 * You may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
Michal Vaskoafd416b2016-02-25 14:51:46 +010012 *
Radek Krejci9b81f5b2016-02-24 13:14:49 +010013 * https://opensource.org/licenses/BSD-3-Clause
Radek Krejcid0d19522015-09-02 13:49:25 +020014 */
15
16#ifndef NC_CONFIG_H_
17#define NC_CONFIG_H_
18
19/*
David Sedlákaae4df32018-10-08 22:27:22 +020020 * Mark all objects as hidden and export only objects explicitly marked to be part of the public API or
21 * those marked as mock objects for testing purpose
Radek Krejcid0d19522015-09-02 13:49:25 +020022 */
23#define API __attribute__((visibility("default")))
David Sedlákddde4492018-09-30 21:34:38 +020024#define MOCK __attribute__((visibility("default")))
25
Radek Krejci14b14032015-10-21 15:19:43 +020026/*
apropp-molex4e903c32020-04-20 03:06:58 -040027 * Support for getpeereid
28 */
29#cmakedefine HAVE_GETPEEREID
30
31/*
32 * Support for shadow file manipulation
33 */
34#cmakedefine HAVE_SHADOW
35
36/*
37 * Support for crypt.h
38 */
39#cmakedefine HAVE_CRYPT
40
41/*
Michal Vasko5a446472020-05-06 12:43:42 +020042 * Location of installed basic YANG modules on the system
Radek Krejci14b14032015-10-21 15:19:43 +020043 */
Michal Vasko5a446472020-05-06 12:43:42 +020044#define NC_YANG_DIR "@YANG_MODULE_DIR@"
Radek Krejci14b14032015-10-21 15:19:43 +020045
Michal Vasko6b7c42e2016-03-02 15:46:41 +010046/*
Michal Vaskof471fa02017-02-15 10:48:12 +010047 * Inactive read timeout
Michal Vasko6b7c42e2016-03-02 15:46:41 +010048 */
Michal Vaskof471fa02017-02-15 10:48:12 +010049#define NC_READ_INACT_TIMEOUT @READ_INACTIVE_TIMEOUT@
50
51/*
52 * Active read timeout in seconds
53 * (also used for internal <get-schema> RPC reply timeout)
54 */
55#define NC_READ_ACT_TIMEOUT @READ_ACTIVE_TIMEOUT@
Michal Vasko6b7c42e2016-03-02 15:46:41 +010056
Michal Vaskoafdb8ec2017-02-15 11:25:36 +010057/*
58 * pspoll structure queue size (also found in nc_server.h)
59 */
60#define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
61
Michal Vasko5a9bd9c2019-08-16 15:50:09 +020062/* Microseconds after which tasks are repeated until the full timeout elapses.
63 * A millisecond (1000) should be divisible by this number without remain.
64 */
65#define NC_TIMEOUT_STEP @TIMEOUT_STEP@
66
Rosen Penevef2f3ac2019-07-15 18:15:28 -070067/* Portability feature-check macros. */
68#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
69
Radek Krejcid0d19522015-09-02 13:49:25 +020070#endif /* NC_CONFIG_H_ */