]> git.proxmox.com Git - mirror_frr.git/blob - tests/lib/cli/common_cli.h
doc: Add `show ipv6 rpf X:X::X:X` command to docs
[mirror_frr.git] / tests / lib / cli / common_cli.h
1 /*
2 * generic CLI test helper functions
3 *
4 * Copyright (C) 2015 by David Lamparter,
5 * for Open Source Routing / NetDEF, Inc.
6 *
7 * Quagga is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * Quagga is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef _COMMON_CLI_H
23 #define _COMMON_CLI_H
24
25 #include "zebra.h"
26 #include "vty.h"
27 #include "command.h"
28 #include "northbound.h"
29
30 extern const struct frr_yang_module_info *const *test_yang_modules;
31
32 /* function to be implemented by test */
33 extern void test_init(int argc, char **argv);
34
35 /* functions provided by common cli
36 * (includes main())
37 */
38 extern struct thread_master *master;
39
40 extern int test_log_prio;
41
42 extern int dump_args(struct vty *vty, const char *descr, int argc,
43 struct cmd_token *argv[]);
44
45 #define DUMMY_HELPSTR \
46 "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n" \
47 "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n" \
48 "20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n"
49 #define DUMMY_DEFUN(name, cmdstr) \
50 DEFUN(name, name##_cmd, cmdstr, DUMMY_HELPSTR) \
51 { \
52 return dump_args(vty, #name, argc, argv); \
53 }
54
55 #endif /* _COMMON_CLI_H */