]>
git.proxmox.com Git - mirror_frr.git/blob - lib/grammar_sandbox_main.c
2 * Testing shim and API examples for the new CLI backend.
4 * Minimal main() to run grammar_sandbox standalone.
5 * [split off grammar_sandbox.c 2017-01-23]
7 * Copyright (C) 2016 Cumulus Networks, Inc.
8 * Copyright (C) 2017 David Lamparter for NetDEF, Inc.
10 * This file is part of FreeRangeRouting (FRR).
12 * FRR is free software; you can redistribute it and/or modify it under the
13 * terms of the GNU General Public License as published by the Free Software
14 * Foundation; either version 2, or (at your option) any later version.
16 * FRR is distributed in the hope that it will be useful, but WITHOUT ANY
17 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 * You should have received a copy of the GNU General Public License along
22 * with FRR; see the file COPYING. If not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #include "memory_vty.h"
29 static void vty_do_exit(void)
35 struct thread_master
*master
;
37 int main(int argc
, char **argv
)
41 master
= thread_master_create ();
43 openzlog ("grammar_sandbox", "NONE", 0,
44 LOG_CONS
|LOG_NDELAY
|LOG_PID
, LOG_DAEMON
);
45 zlog_set_level (ZLOG_DEST_SYSLOG
, ZLOG_DISABLED
);
46 zlog_set_level (ZLOG_DEST_STDOUT
, LOG_DEBUG
);
47 zlog_set_level (ZLOG_DEST_MONITOR
, ZLOG_DISABLED
);
51 host
.name
= strdup ("test");
56 vty_stdio (vty_do_exit
);
58 /* Fetch next active thread. */
59 while (thread_fetch (master
, &thread
))
60 thread_call (&thread
);