blob: 1a97f170b206ab649f4e9f001a2ee010c8256c23 [file] [log] [blame]
Roman Janota907cf932022-06-03 12:33:34 +02001/**
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
romanc1d2b092023-02-02 08:58:27 +010024/* directory with examples source code and this header */
25#define EXAMPLES_DIR "@CMAKE_SOURCE_DIR@/examples"
26
Roman Janota907cf932022-06-03 12:33:34 +020027/* SSH listening IP address */
28#define SSH_ADDRESS "127.0.0.1"
29
Roman Janota907cf932022-06-03 12:33:34 +020030/* SSH 'password' authentication exptected username and password */
31#define SSH_USERNAME "admin"
Roman Janota907cf932022-06-03 12:33:34 +020032
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 Janota907cf932022-06-03 12:33:34 +020041#endif