Annotation of embedaddon/quagga/tests/common-cli.h, revision 1.1.1.1

1.1       misho       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
                     18:  * along with Quagga; see the file COPYING.  If not, write to the Free
                     19:  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
                     20:  * 02111-1307, USA.
                     21:  */
                     22: 
                     23: #ifndef _COMMON_CLI_H
                     24: #define _COMMON_CLI_H
                     25: 
                     26: #include "zebra.h"
                     27: #include "vty.h"
                     28: #include "command.h"
                     29: 
                     30: /* function to be implemented by test */
                     31: extern void test_init (void);
                     32: 
                     33: /* functions provided by common cli
                     34:  * (includes main())
                     35:  */
                     36: extern struct thread_master *master;
                     37: 
                     38: extern int dump_args(struct vty *vty, const char *descr,
                     39:               int argc, const char **argv);
                     40: 
                     41: #define DUMMY_HELPSTR \
                     42:        "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n" \
                     43:        "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n" \
                     44:        "20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n"
                     45: #define DUMMY_DEFUN(name, cmdstr) \
                     46:         DEFUN (name, name ## _cmd, cmdstr, DUMMY_HELPSTR) \
                     47:         { return dump_args(vty, #name, argc, argv); }
                     48: 
                     49: #endif /* _COMMON_CLI_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>