Commit 8993cc58 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a debug.listen_address cli command to report the actual listen

address(es)



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4369 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 7cf414c5
......@@ -353,16 +353,46 @@ ccf_start(struct cli *cli, const char * const *av, void *priv)
VSL(SLT_Debug, 0, "Acceptor is %s", vca_act->name);
}
/*--------------------------------------------------------------------*/
static void
ccf_listen_address(struct cli *cli, const char * const *av, void *priv)
{
struct listen_sock *ls;
char h[32], p[32];
(void)cli;
(void)av;
(void)priv;
VTAILQ_FOREACH(ls, &heritage.socks, list) {
if (ls->sock < 0)
continue;
TCP_myname(ls->sock, h, sizeof h, p, sizeof p);
cli_out(cli, "%s %s\n", h, p);
}
}
/*--------------------------------------------------------------------*/
static struct cli_proto vca_cmds[] = {
{ CLI_SERVER_START, ccf_start },
{ NULL }
};
static struct cli_proto vca_debug_cmds[] = {
{ "debug.listen_address",
"debug.listen_address",
"Report the actual listen address\n", 0, 0,
ccf_listen_address, NULL },
{ NULL }
};
void
VCA_Init(void)
{
CLI_AddFuncs(MASTER_CLI, vca_cmds);
CLI_AddFuncs(DEBUG_CLI, vca_debug_cmds);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment