blob: 966050ce0d095cbda441d7e44210490cabcab4a9 [file] [log] [blame]
Radek Krejcid0d19522015-09-02 13:49:25 +02001/**
2 * \file config.h
3 * \author Radek Krejci <rkrejci@cesnet.cz>
4 * \brief libnetconf2 various configuration settings.
5 *
Michal Vaskof471fa02017-02-15 10:48:12 +01006 * Copyright (c) 2015 - 2017 CESNET, z.s.p.o.
Radek Krejcid0d19522015-09-02 13:49:25 +02007 *
Radek Krejci9b81f5b2016-02-24 13:14:49 +01008 * This source code is licensed under BSD 3-Clause License (the "License").
9 * You may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
Michal Vaskoafd416b2016-02-25 14:51:46 +010011 *
Radek Krejci9b81f5b2016-02-24 13:14:49 +010012 * https://opensource.org/licenses/BSD-3-Clause
Radek Krejcid0d19522015-09-02 13:49:25 +020013 */
14
15#ifndef NC_CONFIG_H_
16#define NC_CONFIG_H_
17
18/*
David Sedlákaae4df32018-10-08 22:27:22 +020019 * Mark all objects as hidden and export only objects explicitly marked to be part of the public API or
20 * those marked as mock objects for testing purpose
Radek Krejcid0d19522015-09-02 13:49:25 +020021 */
22#define API __attribute__((visibility("default")))
David Sedlákddde4492018-09-30 21:34:38 +020023#define MOCK __attribute__((visibility("default")))
24
Radek Krejci14b14032015-10-21 15:19:43 +020025/*
apropp-molex4e903c32020-04-20 03:06:58 -040026 * Support for getpeereid
27 */
28#cmakedefine HAVE_GETPEEREID
29
30/*
31 * Support for shadow file manipulation
32 */
33#cmakedefine HAVE_SHADOW
34
35/*
36 * Support for crypt.h
37 */
38#cmakedefine HAVE_CRYPT
39
40/*
Michal Vasko5a446472020-05-06 12:43:42 +020041 * Location of installed basic YANG modules on the system
Radek Krejci14b14032015-10-21 15:19:43 +020042 */
Michal Vasko5a446472020-05-06 12:43:42 +020043#define NC_YANG_DIR "@YANG_MODULE_DIR@"
Radek Krejci14b14032015-10-21 15:19:43 +020044
Michal Vasko6b7c42e2016-03-02 15:46:41 +010045/*
Michal Vaskof471fa02017-02-15 10:48:12 +010046 * Inactive read timeout
Michal Vasko6b7c42e2016-03-02 15:46:41 +010047 */
Michal Vaskof471fa02017-02-15 10:48:12 +010048#define NC_READ_INACT_TIMEOUT @READ_INACTIVE_TIMEOUT@
49
50/*
51 * Active read timeout in seconds
52 * (also used for internal <get-schema> RPC reply timeout)
53 */
54#define NC_READ_ACT_TIMEOUT @READ_ACTIVE_TIMEOUT@
Michal Vasko6b7c42e2016-03-02 15:46:41 +010055
Michal Vaskoafdb8ec2017-02-15 11:25:36 +010056/*
57 * pspoll structure queue size (also found in nc_server.h)
58 */
59#define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
60
Michal Vasko5a9bd9c2019-08-16 15:50:09 +020061/* Microseconds after which tasks are repeated until the full timeout elapses.
62 * A millisecond (1000) should be divisible by this number without remain.
63 */
64#define NC_TIMEOUT_STEP @TIMEOUT_STEP@
65
Rosen Penevef2f3ac2019-07-15 18:15:28 -070066/* Portability feature-check macros. */
67#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
68
Radek Krejcid0d19522015-09-02 13:49:25 +020069#endif /* NC_CONFIG_H_ */