pppstats.c revision 1
#ifndef lint
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#ifndef STREAMS
#ifndef _linux_
#ifdef PPPIO_GETSTAT64
#ifndef ppp_stats64
static int infinite;
static int unit;
static char *progname;
static char *interface;
extern int optind;
extern char *optarg;
#if !defined(PPP_DRV_NAME)
usage()
progname);
int arg;
#ifndef STREAMS
#ifdef _linux_
#ifdef _linux_
if (zflag)
rflag = 0;
#ifdef _linux_
char *ptr;
#ifdef PPPIO_GETSTAT64
if (zflag)
rflag = 0;
#define MAX0(a) ((int)(a) > 0? (a): 0)
intpr()
register int line = 0;
char *bunit;
int ratef = 0;
signalled = 0;
if (zflag) {
bunit);
bunit);
if (!rflag)
if (vflag)
if (rflag)
if (!rflag)
if (vflag)
if (rflag)
if (zflag) {
if (ratef) {
W(d.comp_packets),
W(d.inc_packets),
W(c.comp_packets),
W(c.inc_packets),
W(d.comp_bytes),
W(d.comp_packets),
W(d.inc_bytes),
W(d.inc_packets),
W(c.comp_bytes),
W(c.comp_packets),
W(c.inc_bytes),
W(c.inc_packets),
if (ratef)
V(p.ppp_ipackets),
if (!rflag)
if (vflag)
if (rflag) {
if (ratef)
if (ratef)
V(p.ppp_opackets),
if (!rflag)
if (vflag)
if (rflag) {
if (ratef)
line++;
count--;
if (!signalled) {
signalled = 0;
if (!aflag) {
int argc;
char *argv[];
#ifdef STREAMS
char *dev;
++progname;
++aflag;
++dflag;
++vflag;
++rflag;
++zflag;
if (count <= 0)
usage();
if (interval <= 0)
usage();
usage();
if (aflag)
dflag = 0;
usage();
if (argc > 0)
#ifndef STREAMS
#ifdef _linux_
#ifdef __osf__
intpr();