summaryrefslogtreecommitdiff
path: root/accel-pppd/cli/show_sessions.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/cli/show_sessions.c')
-rw-r--r--accel-pppd/cli/show_sessions.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c
index b814e82..22f5318 100644
--- a/accel-pppd/cli/show_sessions.c
+++ b/accel-pppd/cli/show_sessions.c
@@ -629,6 +629,18 @@ static void print_tx_pkts(struct ap_session *ses, char *buf)
sprintf(buf, "%llu", stats.tx_packets);
}
+static void print_inbound_if(struct ap_session *ses, char *buf)
+{
+ if (ses->ctrl->ifname)
+ snprintf(buf, CELL_SIZE, "%s", ses->ctrl->ifname);
+}
+
+static void print_service_name(struct ap_session *ses, char *buf)
+{
+ if (ses->ctrl->service_name)
+ snprintf(buf, CELL_SIZE, "%s", ses->ctrl->service_name);
+}
+
static void load_config(void *data)
{
const char *opt = NULL;
@@ -663,7 +675,7 @@ static void init(void)
cli_show_ses_register("ip", "IP address", print_ip);
cli_show_ses_register("ip6", "IPv6 address", print_ip6);
cli_show_ses_register("ip6-dp", "IPv6 delegated prefix", print_ip6_dp);
- cli_show_ses_register("type", "VPN type", print_type);
+ cli_show_ses_register("type", "connection type", print_type);
cli_show_ses_register("state", "state of session", print_state);
cli_show_ses_register("uptime", "uptime (human readable)", print_uptime);
cli_show_ses_register("uptime-raw", "uptime (in seconds)", print_uptime_raw);
@@ -677,6 +689,8 @@ static void init(void)
cli_show_ses_register("tx-bytes-raw", "transmitted bytes", print_tx_bytes_raw);
cli_show_ses_register("rx-pkts", "received packets", print_rx_pkts);
cli_show_ses_register("tx-pkts", "transmitted packets", print_tx_pkts);
+ cli_show_ses_register("inbound-if", "inbound interface", print_inbound_if);
+ cli_show_ses_register("service-name", "PPPoE service name", print_service_name);
triton_event_register_handler(EV_CONFIG_RELOAD, load_config);
}