summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/cli/show_sessions.c8
-rw-r--r--accel-pppd/ppp/ccp_mppe.c4
-rw-r--r--accel-pppd/ppp/ppp.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c
index 4caded1d..c0fec580 100644
--- a/accel-pppd/cli/show_sessions.c
+++ b/accel-pppd/cli/show_sessions.c
@@ -15,7 +15,7 @@
#include "memdebug.h"
#define CELL_SIZE 128
-#define DEF_COLUMNS "ifname,username,calling-sid,ip,rate-limit,type,state,uptime"
+#define DEF_COLUMNS "ifname,username,calling-sid,ip,rate-limit,type,comp,state,uptime"
struct column_t
{
@@ -450,6 +450,11 @@ static void print_sid(const struct ppp_t *ppp, char *buf)
snprintf(buf, CELL_SIZE, "%s", ppp->sessionid);
}
+static void print_comp(const struct ppp_t *ppp, char *buf)
+{
+ snprintf(buf, CELL_SIZE, "%s", ppp->comp ? ppp->comp : "");
+}
+
static void init(void)
{
cli_register_simple_cmd2(show_ses_exec, show_ses_help, 2, "show", "sessions");
@@ -463,6 +468,7 @@ static void init(void)
cli_show_ses_register("calling-sid", "calling station id", print_calling_sid);
cli_show_ses_register("called-sid", "called station id", print_called_sid);
cli_show_ses_register("sid", "session id", print_sid);
+ cli_show_ses_register("comp", "compression/ecnryption method", print_comp);
}
DEFINE_INIT(12, init);
diff --git a/accel-pppd/ppp/ccp_mppe.c b/accel-pppd/ppp/ccp_mppe.c
index 90f9d838..388e2f6c 100644
--- a/accel-pppd/ppp/ccp_mppe.c
+++ b/accel-pppd/ppp/ccp_mppe.c
@@ -214,7 +214,9 @@ static int mppe_recv_conf_req(struct ppp_ccp_t *ccp, struct ccp_option_t *opt, u
}
log_ppp_debug(" (mppe enabled)");
- }
+ ccp->ppp->comp = "mppe";
+ } else
+ ccp->ppp->comp = NULL;
return CCP_OPT_ACK;
}
diff --git a/accel-pppd/ppp/ppp.h b/accel-pppd/ppp/ppp.h
index 18cb5c21..f831242f 100644
--- a/accel-pppd/ppp/ppp.h
+++ b/accel-pppd/ppp/ppp.h
@@ -114,6 +114,7 @@ struct ppp_t
struct ipv6db_item_t *ipv6;
char *ipv4_pool_name;
char *ipv6_pool_name;
+ const char *comp;
struct ppp_ctrl_t *ctrl;