• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2017-2019 Petr Vorel <pvorel@suse.cz>
4  *
5  * Internal helper functions for the shell library. Do not use directly
6  * in test programs.
7  */
8 
9 #ifndef TST_PRIVATE_H_
10 #define TST_PRIVATE_H_
11 
12 #include <stdio.h>
13 #include <netdb.h>
14 
15 #define MAX_IPV4_PREFIX 32
16 #define MAX_IPV6_PREFIX 128
17 
18 #define tst_res_comment(...) { \
19 	fprintf(stderr, "# "); \
20 	tst_res(__VA_ARGS__); } \
21 
22 
23 #define tst_brk_comment(...) { \
24 	fprintf(stderr, "# "); \
25 	tst_brk(TCONF, __VA_ARGS__); } \
26 
27 void tst_print_svar(const char *name, const char *val);
28 void tst_print_svar_change(const char *name, const char *val);
29 
30 int tst_get_prefix(const char *ip_str, int is_ipv6);
31 
32 #endif
33