Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 1 | /** |
Michal Vasko | 95ea9ff | 2021-11-09 12:29:14 +0100 | [diff] [blame] | 2 | * @file config.h |
| 3 | * @author Radek Krejci <rkrejci@cesnet.cz> |
| 4 | * @brief libnetconf2 various configuration settings. |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 5 | * |
Michal Vasko | 95ea9ff | 2021-11-09 12:29:14 +0100 | [diff] [blame] | 6 | * @copyright |
Michal Vasko | f471fa0 | 2017-02-15 10:48:12 +0100 | [diff] [blame] | 7 | * Copyright (c) 2015 - 2017 CESNET, z.s.p.o. |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 8 | * |
Radek Krejci | 9b81f5b | 2016-02-24 13:14:49 +0100 | [diff] [blame] | 9 | * 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 Vasko | afd416b | 2016-02-25 14:51:46 +0100 | [diff] [blame] | 12 | * |
Radek Krejci | 9b81f5b | 2016-02-24 13:14:49 +0100 | [diff] [blame] | 13 | * https://opensource.org/licenses/BSD-3-Clause |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #ifndef NC_CONFIG_H_ |
| 17 | #define NC_CONFIG_H_ |
| 18 | |
| 19 | /* |
David Sedlák | aae4df3 | 2018-10-08 22:27:22 +0200 | [diff] [blame] | 20 | * 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 Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 22 | */ |
| 23 | #define API __attribute__((visibility("default"))) |
David Sedlák | ddde449 | 2018-09-30 21:34:38 +0200 | [diff] [blame] | 24 | #define MOCK __attribute__((visibility("default"))) |
| 25 | |
Radek Krejci | 14b1403 | 2015-10-21 15:19:43 +0200 | [diff] [blame] | 26 | /* |
apropp-molex | 4e903c3 | 2020-04-20 03:06:58 -0400 | [diff] [blame] | 27 | * 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 Vasko | 5a44647 | 2020-05-06 12:43:42 +0200 | [diff] [blame] | 42 | * Location of installed basic YANG modules on the system |
Radek Krejci | 14b1403 | 2015-10-21 15:19:43 +0200 | [diff] [blame] | 43 | */ |
Michal Vasko | 5a44647 | 2020-05-06 12:43:42 +0200 | [diff] [blame] | 44 | #define NC_YANG_DIR "@YANG_MODULE_DIR@" |
Radek Krejci | 14b1403 | 2015-10-21 15:19:43 +0200 | [diff] [blame] | 45 | |
Michal Vasko | 6b7c42e | 2016-03-02 15:46:41 +0100 | [diff] [blame] | 46 | /* |
Michal Vasko | f471fa0 | 2017-02-15 10:48:12 +0100 | [diff] [blame] | 47 | * Inactive read timeout |
Michal Vasko | 6b7c42e | 2016-03-02 15:46:41 +0100 | [diff] [blame] | 48 | */ |
Michal Vasko | f471fa0 | 2017-02-15 10:48:12 +0100 | [diff] [blame] | 49 | #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 Vasko | 6b7c42e | 2016-03-02 15:46:41 +0100 | [diff] [blame] | 56 | |
Michal Vasko | afdb8ec | 2017-02-15 11:25:36 +0100 | [diff] [blame] | 57 | /* |
| 58 | * pspoll structure queue size (also found in nc_server.h) |
| 59 | */ |
| 60 | #define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@ |
| 61 | |
Michal Vasko | 5a9bd9c | 2019-08-16 15:50:09 +0200 | [diff] [blame] | 62 | /* 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 Penev | ef2f3ac | 2019-07-15 18:15:28 -0700 | [diff] [blame] | 67 | /* Portability feature-check macros. */ |
| 68 | #cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP |
| 69 | |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 70 | #endif /* NC_CONFIG_H_ */ |