X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/cf77b46229cba4fc0913c6e1f972303d63f442a7..464c44fbd1394ac006d8d99f16e80ead423c1c47:/print-lcp.c diff --git a/print-lcp.c b/print-lcp.c index 88dd6b73..a40b7b54 100644 --- a/print-lcp.c +++ b/print-lcp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = -"@(#) $Header: /tcpdump/master/tcpdump/Attic/print-lcp.c,v 1.5 2000-05-15 00:38:37 assar Exp $ (LBL)"; +"@(#) $Header: /tcpdump/master/tcpdump/Attic/print-lcp.c,v 1.10 2002-06-11 17:08:52 itojun Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -32,18 +32,8 @@ static const char rcsid[] = #include #include -#if __STDC__ -struct mbuf; -struct rtentry; -#endif -#include - #include -#include -#ifdef HAVE_MEMORY_H -#include -#endif #include #include @@ -53,7 +43,7 @@ struct rtentry; #include "ppp.h" /* Codes */ -enum { +enum { LCP_CONFREQ = 1, LCP_CONFACK = 2, LCP_CONFNAK = 3, @@ -132,18 +122,18 @@ lcp_print(register const u_char *bp, u_int length) const u_char *lcp_data; lcp_data = bp+4; - + if (snapend < lcp_data) { printf(" [LCP|]"); return; } - + lcp_code = bp[0]; lcp_id = bp[1]; lcp_length = EXTRACT_16BITS(bp+2); printf("LCP %s id=0x%x", tok2str(lcpcode2str, "LCP-#%d", lcp_code), lcp_id); - + switch (lcp_code) { case LCP_CONFREQ: case LCP_CONFACK: @@ -169,7 +159,7 @@ lcp_print(register const u_char *bp, u_int length) if (snapend < p+2) return; printf("%s",tok2str(lcpauth2str, "AUTH-%#x", ntohs(*(u_short*)p))); if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length); - if (lcpopt_length >= 5 && p < snapend) + if (lcpopt_length >= 5 && p < snapend) printf(" %s",tok2str(lcpchap2str, "%#x", p[0])); break; case LCP_QUALPROTO: @@ -221,6 +211,6 @@ lcp_print(register const u_char *bp, u_int length) default: break; } - + return; }