diff options
author | brian <brian@FreeBSD.org> | 1997-10-26 01:04:02 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-10-26 01:04:02 +0000 |
commit | 486b8925ecb0d408e403474828e20c1cce8aaec8 (patch) | |
tree | cca66974908224bf517868aaafb2e4acd1abe88d /usr.sbin/ppp/hdlc.c | |
parent | 1d2927c9fac7bcfe68bf6ab502c716adc91d6f09 (diff) | |
download | FreeBSD-src-486b8925ecb0d408e403474828e20c1cce8aaec8.zip FreeBSD-src-486b8925ecb0d408e403474828e20c1cce8aaec8.tar.gz |
Cosmetic (no functional changes):
o Add missing $Id$s
o Move extern decls from .c -> .h files
o Staticize
o Remove #includes from .h files
o style(9)ify includes
o bcopy -> memcpy
bzero -> memset
bcmp -> memcmp
index -> strchr
rindex -> strrchr
o Move timeout.h -> timer.h (making it consistent w/ timer.c)
o Add -Wmissing-prototypes
Diffstat (limited to 'usr.sbin/ppp/hdlc.c')
-rw-r--r-- | usr.sbin/ppp/hdlc.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c index ce26bec..c27a79c 100644 --- a/usr.sbin/ppp/hdlc.c +++ b/usr.sbin/ppp/hdlc.c @@ -17,16 +17,28 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: hdlc.c,v 1.18 1997/09/10 21:33:32 brian Exp $ + * $Id: hdlc.c,v 1.19 1997/09/10 21:36:54 brian Exp $ * * TODO: */ +#include <sys/param.h> +#include <netinet/in.h> + +#include <stdio.h> +#include <string.h> +#include <termios.h> + +#include "mbuf.h" +#include "log.h" +#include "defs.h" +#include "timer.h" #include "fsm.h" #include "hdlc.h" #include "lcpproto.h" #include "lcp.h" #include "lqr.h" #include "loadalias.h" +#include "command.h" #include "vars.h" #include "pred.h" #include "modem.h" @@ -39,8 +51,11 @@ struct hdlcstat { int unknownproto; } HdlcStat; -static int ifOutPackets, ifOutOctets, ifOutLQRs; -static int ifInPackets, ifInOctets; +static int ifOutPackets; +static int ifOutOctets; +static int ifOutLQRs; +static int ifInPackets; +static int ifInOctets; struct protostat { u_short number; @@ -321,7 +336,7 @@ HdlcErrorCheck() struct hdlcstat *hp = &HdlcStat; struct hdlcstat *op = &laststat; - if (bcmp(hp, op, sizeof(laststat))) { + if (memcmp(hp, op, sizeof(laststat))) { LogPrintf(LogPHASE, "HDLC errors -> FCS: %u ADDR: %u COMD: %u PROTO: %u\n", hp->badfcs - op->badfcs, hp->badaddr - op->badaddr, hp->badcommand - op->badcommand, hp->unknownproto - op->unknownproto); |