Roman Janota | 907cf93 | 2022-06-03 12:33:34 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @file example.h |
| 3 | * @author Roman Janota <xjanot04@fit.vutbr.cz> |
| 4 | * @brief libnetconf2 example header |
| 5 | * |
| 6 | * @copyright |
| 7 | * Copyright (c) 2022 CESNET, z.s.p.o. |
| 8 | * |
| 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 |
| 12 | * |
| 13 | * https://opensource.org/licenses/BSD-3-Clause |
| 14 | */ |
| 15 | |
| 16 | #ifndef _EXAMPLE_H_ |
| 17 | #define _EXAMPLE_H_ |
| 18 | |
| 19 | #include <stdio.h> |
| 20 | |
| 21 | /* directory with library YANG modules */ |
| 22 | #define MODULES_DIR "@CMAKE_SOURCE_DIR@/modules" |
| 23 | |
roman | c1d2b09 | 2023-02-02 08:58:27 +0100 | [diff] [blame] | 24 | /* directory with examples source code and this header */ |
| 25 | #define EXAMPLES_DIR "@CMAKE_SOURCE_DIR@/examples" |
| 26 | |
Roman Janota | 907cf93 | 2022-06-03 12:33:34 +0200 | [diff] [blame] | 27 | /* SSH listening IP address */ |
| 28 | #define SSH_ADDRESS "127.0.0.1" |
| 29 | |
Roman Janota | 907cf93 | 2022-06-03 12:33:34 +0200 | [diff] [blame] | 30 | /* SSH 'password' authentication exptected username and password */ |
| 31 | #define SSH_USERNAME "admin" |
Roman Janota | 907cf93 | 2022-06-03 12:33:34 +0200 | [diff] [blame] | 32 | |
| 33 | /* time in microseconds to sleep for if there are no new RPCs and no new sessions */ |
| 34 | #define BACKOFF_TIMEOUT_USECS 100 |
| 35 | |
| 36 | #define ERR_MSG_CLEANUP(msg) \ |
| 37 | rc = 1; \ |
| 38 | fprintf(stderr, "%s", msg); \ |
| 39 | goto cleanup |
| 40 | |
Roman Janota | 907cf93 | 2022-06-03 12:33:34 +0200 | [diff] [blame] | 41 | #endif |