diff options
author | brian <brian@FreeBSD.org> | 1997-11-18 14:52:08 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-18 14:52:08 +0000 |
commit | 7a358d8b024e6ebd90807720438c539bcac14855 (patch) | |
tree | baa2a2ef6ea91adf2c59b11bbffbd706f85ced30 /usr.sbin/ppp/throughput.h | |
parent | 907dcc5c043baddb164e2c76f04097ea096b9c3a (diff) | |
download | FreeBSD-src-7a358d8b024e6ebd90807720438c539bcac14855.zip FreeBSD-src-7a358d8b024e6ebd90807720438c539bcac14855.tar.gz |
Add throughput logging (disabled by default).
Use "enable throughput" to see modem & IPCP throughput.
Removed an extraneous prompt()
Diffstat (limited to 'usr.sbin/ppp/throughput.h')
-rw-r--r-- | usr.sbin/ppp/throughput.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/usr.sbin/ppp/throughput.h b/usr.sbin/ppp/throughput.h new file mode 100644 index 0000000..907f224 --- /dev/null +++ b/usr.sbin/ppp/throughput.h @@ -0,0 +1,24 @@ +/* + * $Id$ + */ + +#define SAMPLE_PERIOD 5 + +struct pppThroughput { + time_t uptime; + u_long OctetsIn; + u_long OctetsOut; + u_long SampleOctets[SAMPLE_PERIOD]; + int OctetsPerSecond; + int BestOctetsPerSecond; + int nSample; + struct pppTimer Timer; +}; + +extern void throughput_init(struct pppThroughput *); +extern void throughput_disp(struct pppThroughput *, FILE *); +extern void throughput_log(struct pppThroughput *, int, const char *); +extern void throughput_start(struct pppThroughput *); +extern void throughput_stop(struct pppThroughput *); +extern void throughput_addin(struct pppThroughput *, int); +extern void throughput_addout(struct pppThroughput *, int); |