struct heritage heritage;
-#if 0
-/*--------------------------------------------------------------------
- * Generic passthrough for CLI functions
- */
-
-static void
-cli_passthrough_cb(unsigned u, const char *r, void *priv)
-{
- struct cli *cli = priv;
-
- cli_out(cli, "%s\n", r);
- cli_result(cli, u);
- cli_resume(cli);
-}
-
-static void
-m_cli_func_passthrough(struct cli *cli, char **av, void *priv)
-{
-
- (void)av;
- (void)priv;
-
- cli_suspend(cli);
- mgt_child_request(cli_passthrough_cb, cli, &av[2], av[1]);
-}
-#endif
-
/*--------------------------------------------------------------------*/
static char *
return (vf);
}
-#if 0
-
-/*--------------------------------------------------------------------*/
-
-static void
-m_cli_func_server_start(struct cli *cli, char **av, void *priv)
-{
-
- (void)cli;
- (void)av;
- (void)priv;
-
- mgt_child_start();
-}
-
-/*--------------------------------------------------------------------*/
-
-static void
-m_cli_func_server_stop(struct cli *cli, char **av, void *priv)
-{
-
- (void)cli;
- (void)av;
- (void)priv;
-
- mgt_child_stop();
-}
-
-/*--------------------------------------------------------------------*/
-
-static void
-m_cli_func_exit(struct cli *cli, char **av, void *priv)
-{
-
- (void)cli;
- (void)av;
- (void)priv;
- mgt_child_kill();
- exit (0);
-}
-
-/*--------------------------------------------------------------------*/
-
-static void
-m_cli_func_verbose(struct cli *cli, char **av, void *priv)
-{
-
- (void)av;
- (void)priv;
-
- cli->verbose = !cli->verbose;
-}
-
-
-static void
-m_cli_func_ping(struct cli *cli, char **av, void *priv)
-{
- time_t t;
-
- (void)priv;
-
- if (av[2] != NULL) {
- cli_out(cli, "Got your %s\n", av[2]);
- }
- t = time(NULL);
- cli_out(cli, "PONG %ld\n", t);
-}
-
-/*--------------------------------------------------------------------*/
-
-static void
-m_cli_func_stats(struct cli *cli, char **av, void *priv)
-{
-
- (void)av;
- (void)priv;
-
- assert (VSL_stats != NULL);
-#define MAC_STAT(n,t,f,d) \
- cli_out(cli, "%12ju " d "\n", (VSL_stats->n));
-#include "stat_field.h"
-#undef MAC_STAT
-}
-
-/*--------------------------------------------------------------------*/
-
-static struct cli_proto cli_proto[] = {
- /* URL manipulation */
- { CLI_URL_QUERY, m_cli_func_passthrough, NULL },
- { CLI_URL_PURGE, m_cli_func_passthrough, NULL },
- { CLI_URL_STATUS, m_cli_func_passthrough, NULL },
- { CLI_CONFIG_LOAD, m_cli_func_config_load, NULL },
- { CLI_CONFIG_INLINE, m_cli_func_config_inline, NULL },
- { CLI_CONFIG_UNLOAD, m_cli_func_passthrough, NULL },
- { CLI_CONFIG_LIST, m_cli_func_passthrough, NULL },
- { CLI_CONFIG_USE, m_cli_func_passthrough, NULL },
- { CLI_SERVER_FREEZE, m_cli_func_passthrough, NULL },
- { CLI_SERVER_THAW, m_cli_func_passthrough, NULL },
- { CLI_SERVER_SUSPEND, m_cli_func_passthrough, NULL },
- { CLI_SERVER_RESUME, m_cli_func_passthrough, NULL },
- { CLI_SERVER_STOP, m_cli_func_server_stop, NULL },
- { CLI_SERVER_START, m_cli_func_server_start, NULL },
- { CLI_SERVER_RESTART },
- { CLI_PING, m_cli_func_ping, NULL },
- { CLI_STATS, m_cli_func_stats, NULL },
- { CLI_ZERO },
- { CLI_HELP, cli_func_help, cli_proto },
- { CLI_VERBOSE, m_cli_func_verbose, NULL },
- { CLI_EXIT, m_cli_func_exit, NULL},
- { CLI_QUIT },
- { CLI_BYE },
- { NULL }
-};
-
-#endif
-
/*--------------------------------------------------------------------*/
static int