diff options
author | brian <brian@FreeBSD.org> | 2000-08-15 00:59:21 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-08-15 00:59:21 +0000 |
commit | 99a91bd0c26b2f7b5c04ac078ddedd9550f164e8 (patch) | |
tree | 1ac1c245b05046fc001749f926966b0cc5140e26 /usr.sbin/ppp/link.h | |
parent | 63e7d24009d010dea2cd23b7a1b4d2ebd2a1aadd (diff) | |
download | FreeBSD-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/link.h')
-rw-r--r-- | usr.sbin/ppp/link.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/ppp/link.h b/usr.sbin/ppp/link.h index 36dfd50..89b6230 100644 --- a/usr.sbin/ppp/link.h +++ b/usr.sbin/ppp/link.h @@ -41,7 +41,11 @@ struct link { int type; /* _LINK type */ const char *name; /* Points to datalink::name */ int len; /* full size of parent struct */ - struct pppThroughput throughput; /* Link throughput statistics */ + struct { + unsigned gather : 1; /* Gather statistics ourself ? */ + struct pppThroughput total; /* Link throughput statistics */ + struct pppThroughput *parent; /* MP link throughput statistics */ + } stats; struct mqueue Queue[2]; /* Our output queue of mbufs */ u_long proto_in[NPROTOSTAT]; /* outgoing protocol stats */ @@ -57,9 +61,6 @@ struct link { #define LINK_QUEUES(link) (sizeof (link)->Queue / sizeof (link)->Queue[0]) #define LINK_HIGHQ(link) ((link)->Queue + LINK_QUEUES(link) - 1) -extern void link_AddInOctets(struct link *, int); -extern void link_AddOutOctets(struct link *, int); - extern void link_SequenceQueue(struct link *); extern void link_DeleteQueue(struct link *); extern size_t link_QueueLen(struct link *); |