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> |
Michal Vasko | 0d81c57 | 2022-09-26 10:39:31 +0200 | [diff] [blame] | 4 | * @author Michal Vasko <mvasko@cesnet.cz> |
Michal Vasko | 95ea9ff | 2021-11-09 12:29:14 +0100 | [diff] [blame] | 5 | * @brief libnetconf2 various configuration settings. |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 6 | * |
Michal Vasko | 95ea9ff | 2021-11-09 12:29:14 +0100 | [diff] [blame] | 7 | * @copyright |
Michal Vasko | 487ab80 | 2024-04-26 12:20:29 +0200 | [diff] [blame] | 8 | * Copyright (c) 2015 - 2024 CESNET, z.s.p.o. |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 9 | * |
Radek Krejci | 9b81f5b | 2016-02-24 13:14:49 +0100 | [diff] [blame] | 10 | * 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 Vasko | afd416b | 2016-02-25 14:51:46 +0100 | [diff] [blame] | 13 | * |
Radek Krejci | 9b81f5b | 2016-02-24 13:14:49 +0100 | [diff] [blame] | 14 | * https://opensource.org/licenses/BSD-3-Clause |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef NC_CONFIG_H_ |
| 18 | #define NC_CONFIG_H_ |
| 19 | |
| 20 | /* |
David Sedlák | aae4df3 | 2018-10-08 22:27:22 +0200 | [diff] [blame] | 21 | * 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 Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 23 | */ |
| 24 | #define API __attribute__((visibility("default"))) |
David Sedlák | ddde449 | 2018-09-30 21:34:38 +0200 | [diff] [blame] | 25 | #define MOCK __attribute__((visibility("default"))) |
| 26 | |
Radek Krejci | 14b1403 | 2015-10-21 15:19:43 +0200 | [diff] [blame] | 27 | /* |
apropp-molex | 4e903c3 | 2020-04-20 03:06:58 -0400 | [diff] [blame] | 28 | * Support for getpeereid |
| 29 | */ |
| 30 | #cmakedefine HAVE_GETPEEREID |
| 31 | |
| 32 | /* |
| 33 | * Support for shadow file manipulation |
| 34 | */ |
| 35 | #cmakedefine HAVE_SHADOW |
| 36 | |
| 37 | /* |
Michal Vasko | 487ab80 | 2024-04-26 12:20:29 +0200 | [diff] [blame] | 38 | * Support for terminal in/out |
| 39 | */ |
| 40 | #cmakedefine HAVE_TERMIOS |
| 41 | |
| 42 | /* |
Michal Vasko | 0d81c57 | 2022-09-26 10:39:31 +0200 | [diff] [blame] | 43 | * Support for keyboard-interactive SSH authentication method |
| 44 | */ |
| 45 | #cmakedefine HAVE_LIBPAM |
| 46 | |
| 47 | /* |
roman | 4562d66 | 2024-04-05 12:27:30 +0200 | [diff] [blame^] | 48 | * Use MbedTLS as TLS back-end |
| 49 | */ |
| 50 | #cmakedefine HAVE_LIBMBEDTLS |
| 51 | |
| 52 | /* |
Michal Vasko | 8022722 | 2022-12-12 09:05:24 +0100 | [diff] [blame] | 53 | * Location of installed YANG modules on the system |
Radek Krejci | 14b1403 | 2015-10-21 15:19:43 +0200 | [diff] [blame] | 54 | */ |
roman | c1d2b09 | 2023-02-02 08:58:27 +0100 | [diff] [blame] | 55 | #define NC_SERVER_SEARCH_DIR "@YANG_MODULE_DIR@" |
| 56 | |
| 57 | /* |
| 58 | * Location of installed YANG modules on the system |
| 59 | */ |
Michal Vasko | 8022722 | 2022-12-12 09:05:24 +0100 | [diff] [blame] | 60 | #define NC_CLIENT_SEARCH_DIR "@CLIENT_SEARCH_DIR@" |
Radek Krejci | 14b1403 | 2015-10-21 15:19:43 +0200 | [diff] [blame] | 61 | |
Michal Vasko | 6b7c42e | 2016-03-02 15:46:41 +0100 | [diff] [blame] | 62 | /* |
Michal Vasko | f471fa0 | 2017-02-15 10:48:12 +0100 | [diff] [blame] | 63 | * Inactive read timeout |
Michal Vasko | 6b7c42e | 2016-03-02 15:46:41 +0100 | [diff] [blame] | 64 | */ |
Michal Vasko | f471fa0 | 2017-02-15 10:48:12 +0100 | [diff] [blame] | 65 | #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 Vasko | 6b7c42e | 2016-03-02 15:46:41 +0100 | [diff] [blame] | 72 | |
Michal Vasko | afdb8ec | 2017-02-15 11:25:36 +0100 | [diff] [blame] | 73 | /* |
| 74 | * pspoll structure queue size (also found in nc_server.h) |
| 75 | */ |
| 76 | #define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@ |
| 77 | |
Michal Vasko | 5a9bd9c | 2019-08-16 15:50:09 +0200 | [diff] [blame] | 78 | /* 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 Penev | ef2f3ac | 2019-07-15 18:15:28 -0700 | [diff] [blame] | 83 | /* Portability feature-check macros. */ |
| 84 | #cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP |
| 85 | |
Radek Krejci | d0d1952 | 2015-09-02 13:49:25 +0200 | [diff] [blame] | 86 | #endif /* NC_CONFIG_H_ */ |