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 | |
| 24 | /* SSH listening IP address */ |
| 25 | #define SSH_ADDRESS "127.0.0.1" |
| 26 | |
| 27 | /* SSH listening port */ |
| 28 | #define SSH_PORT 830 |
| 29 | |
| 30 | /* SSH 'password' authentication exptected username and password */ |
| 31 | #define SSH_USERNAME "admin" |
| 32 | #define SSH_PASSWORD "admin" |
| 33 | |
| 34 | /* time in microseconds to sleep for if there are no new RPCs and no new sessions */ |
| 35 | #define BACKOFF_TIMEOUT_USECS 100 |
| 36 | |
| 37 | #define ERR_MSG_CLEANUP(msg) \ |
| 38 | rc = 1; \ |
| 39 | fprintf(stderr, "%s", msg); \ |
| 40 | goto cleanup |
| 41 | |
| 42 | /* supported server transport protocol */ |
| 43 | enum server_transport { |
| 44 | NONE = 0, |
| 45 | UNIX, |
| 46 | SSH |
| 47 | }; |
| 48 | |
| 49 | #endif |