summaryrefslogtreecommitdiff
path: root/accel-pppd/cli
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/cli')
-rw-r--r--accel-pppd/cli/show_sessions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c
index c725e05..0ea3c94 100644
--- a/accel-pppd/cli/show_sessions.c
+++ b/accel-pppd/cli/show_sessions.c
@@ -379,6 +379,11 @@ early_out:
goto out;
}
+static void print_netns(struct ap_session *ses, char *buf)
+{
+ snprintf(buf, CELL_SIZE, "%s", ses->net->name);
+}
+
static void print_ifname(struct ap_session *ses, char *buf)
{
snprintf(buf, CELL_SIZE, "%s", ses->ifname);
@@ -633,6 +638,7 @@ static void init(void)
cli_register_simple_cmd2(show_ses_exec, show_ses_help, 2, "show", "sessions");
+ cli_show_ses_register("netns", "network namespace name", print_netns);
cli_show_ses_register("ifname", "interface name", print_ifname);
cli_show_ses_register("username", "user name", print_username);
cli_show_ses_register("ip", "IP address", print_ip);