]>
git.proxmox.com Git - mirror_frr.git/blob - lib/grammar_sandbox_main.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Testing shim and API examples for the new CLI backend.
5 * Minimal main() to run grammar_sandbox standalone.
6 * [split off grammar_sandbox.c 2017-01-23]
8 * Copyright (C) 2016 Cumulus Networks, Inc.
9 * Copyright (C) 2017 David Lamparter for NetDEF, Inc.
19 static void vty_do_exit(int isexit
)
26 struct event_loop
*master
;
28 int main(int argc
, char **argv
)
32 master
= event_master_create(NULL
);
34 zlog_aux_init("NONE: ", LOG_DEBUG
);
38 cmd_hostname_set("test");
39 cmd_domainname_set("testdomainname");
41 vty_init(master
, true);
43 nb_init(master
, NULL
, 0, false);
45 vty_stdio(vty_do_exit
);
47 /* Fetch next active thread. */
48 while (event_fetch(master
, &event
))