From d7396281c73c0f5cca41425733e77be22185c919 Mon Sep 17 00:00:00 2001 From: Kazuya Goda Date: Fri, 11 Aug 2017 16:26:00 +0000 Subject: display MRU each sessions in npppctl session command ok yasuoka@ --- usr.sbin/npppctl/npppctl.c | 5 +++-- usr.sbin/npppd/npppd/npppd_ctl.c | 3 ++- usr.sbin/npppd/npppd/npppd_ctl.h | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/npppctl/npppctl.c b/usr.sbin/npppctl/npppctl.c index 47edd69a801..45c2a50185d 100644 --- a/usr.sbin/npppctl/npppctl.c +++ b/usr.sbin/npppctl/npppctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppctl.c,v 1.7 2017/01/21 11:32:04 guenther Exp $ */ +/* $OpenBSD: npppctl.c,v 1.8 2017/08/11 16:25:59 goda Exp $ */ /* * Copyright (c) 2012 Internet Initiative Japan Inc. @@ -296,6 +296,7 @@ fprint_who_all(int i, struct npppd_who *w, FILE *out) " Realm Name : %s\n" " Concentrated Interface : %s\n" " Assigned IPv4 Address : %s\n" + " MRU : %u\n" " Tunnel Protocol : %s\n" " Tunnel From : %s\n" " Start Time : %s\n" @@ -307,7 +308,7 @@ fprint_who_all(int i, struct npppd_who *w, FILE *out) " Output Packets : %lu\n" " Output Errors : %lu (%.1f%%)\n", w->ppp_id, w->ppp_id, w->username, w->rlmname, w->ifname, - inet_ntoa(w->framed_ip_address), w->tunnel_proto, + inet_ntoa(w->framed_ip_address), (u_int)w->mru, w->tunnel_proto, peerstr((struct sockaddr *)&w->tunnel_peer, peer_buf, sizeof(peer_buf)), time_buf, (unsigned long)w->duration_sec, diff --git a/usr.sbin/npppd/npppd/npppd_ctl.c b/usr.sbin/npppd/npppd/npppd_ctl.c index 2e83948f56e..d148fc24659 100644 --- a/usr.sbin/npppd/npppd/npppd_ctl.c +++ b/usr.sbin/npppd/npppd/npppd_ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_ctl.c,v 1.15 2015/12/05 18:43:36 mmcc Exp $ */ +/* $OpenBSD: npppd_ctl.c,v 1.16 2017/08/11 16:25:59 goda Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -297,6 +297,7 @@ npppd_who_init(struct npppd_who *_this, npppd_ppp *ppp) _this->ibytes = ppp->ibytes; _this->obytes = ppp->obytes; _this->ppp_id = ppp->id; + _this->mru = ppp->peer_mru; #ifdef USE_NPPPD_PIPEX if (ppp->pipex_enabled != 0) { diff --git a/usr.sbin/npppd/npppd/npppd_ctl.h b/usr.sbin/npppd/npppd/npppd_ctl.h index 29a52e1564d..d1b4fbe0295 100644 --- a/usr.sbin/npppd/npppd/npppd_ctl.h +++ b/usr.sbin/npppd/npppd/npppd_ctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_ctl.h,v 1.6 2014/03/22 04:30:31 yasuoka Exp $ */ +/* $OpenBSD: npppd_ctl.h,v 1.7 2017/08/11 16:25:59 goda Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -70,6 +70,7 @@ struct npppd_who { } tunnel_peer; /** Tunnel peer address */ struct in_addr framed_ip_address; /** Framed IP Address */ + uint16_t mru; /** MRU */ uint32_t ipackets; /** Numbers of input packets */ uint32_t opackets; /** Numbers of output packets */ uint32_t ierrors; /** Numbers of input error packets */ -- cgit v1.2.3