summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/bundle.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-08-15 00:59:21 +0000
committerbrian <brian@FreeBSD.org>2000-08-15 00:59:21 +0000
commit99a91bd0c26b2f7b5c04ac078ddedd9550f164e8 (patch)
tree1ac1c245b05046fc001749f926966b0cc5140e26 /usr.sbin/ppp/bundle.c
parent63e7d24009d010dea2cd23b7a1b4d2ebd2a1aadd (diff)
downloadFreeBSD-src-99a91bd0c26b2f7b5c04ac078ddedd9550f164e8.zip
FreeBSD-src-99a91bd0c26b2f7b5c04ac078ddedd9550f164e8.tar.gz
Calculate the average link throughput using a counter based on the
cumulative total of all active links rather than basing it on the total of PROTO_MP traffic. This fixes a problem whereby Cisco routers send PROTO_IP packets only when there's only one link (hmm, what a good idea!).
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r--usr.sbin/ppp/bundle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index b6ed5ff..925535a 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -1122,16 +1122,16 @@ bundle_ShowLinks(struct cmdargs const *arg)
for (dl = arg->bundle->links; dl; dl = dl->next) {
prompt_Printf(arg->prompt, "Name: %s [%s, %s]",
dl->name, mode2Nam(dl->physical->type), datalink_State(dl));
- if (dl->physical->link.throughput.rolling && dl->state == DATALINK_OPEN)
+ if (dl->physical->link.stats.total.rolling && dl->state == DATALINK_OPEN)
prompt_Printf(arg->prompt, " bandwidth %d, %llu bps (%llu bytes/sec)",
dl->mp.bandwidth ? dl->mp.bandwidth :
physical_GetSpeed(dl->physical),
- dl->physical->link.throughput.OctetsPerSecond * 8,
- dl->physical->link.throughput.OctetsPerSecond);
+ dl->physical->link.stats.total.OctetsPerSecond * 8,
+ dl->physical->link.stats.total.OctetsPerSecond);
prompt_Printf(arg->prompt, "\n");
}
- t = &arg->bundle->ncp.mp.link.throughput;
+ t = &arg->bundle->ncp.mp.link.stats.total;
secs = t->downtime ? 0 : throughput_uptime(t);
if (secs > t->SamplePeriod)
secs = t->SamplePeriod;
OpenPOWER on IntegriCloud