]> git.proxmox.com Git - mirror_frr.git/blob - tests/lib/cli/common_cli.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / tests / lib / cli / common_cli.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * generic CLI test helper functions
4 *
5 * Copyright (C) 2015 by David Lamparter,
6 * for Open Source Routing / NetDEF, Inc.
7 */
8
9 #ifndef _COMMON_CLI_H
10 #define _COMMON_CLI_H
11
12 #include "zebra.h"
13 #include "vty.h"
14 #include "command.h"
15 #include "northbound.h"
16
17 extern const struct frr_yang_module_info *const *test_yang_modules;
18
19 /* function to be implemented by test */
20 extern void test_init(int argc, char **argv);
21
22 /* functions provided by common cli
23 * (includes main())
24 */
25 extern struct thread_master *master;
26
27 extern int test_log_prio;
28
29 extern int dump_args(struct vty *vty, const char *descr, int argc,
30 struct cmd_token *argv[]);
31
32 #define DUMMY_HELPSTR \
33 "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n" \
34 "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n" \
35 "20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n"
36 #define DUMMY_DEFUN(name, cmdstr) \
37 DEFUN(name, name##_cmd, cmdstr, DUMMY_HELPSTR) \
38 { \
39 return dump_args(vty, #name, argc, argv); \
40 }
41
42 #endif /* _COMMON_CLI_H */