X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppdump%2Fpppdump.c;h=130300a17d348046dbc4a81100f8fbfcf3d9f0a5;hb=92c5612fdb77e83e49c524ae46110c129e13429e;hp=a65a152a917bef424fc74b89591b1763923da995;hpb=d1506f182ba87dd019a9d5594f6acea17a77577f;p=ppp.git diff --git a/pppdump/pppdump.c b/pppdump/pppdump.c index a65a152..130300a 100644 --- a/pppdump/pppdump.c +++ b/pppdump/pppdump.c @@ -35,6 +35,7 @@ */ #include #include +#include #include #include #include "ppp_defs.h" @@ -53,6 +54,12 @@ int tot_sent, tot_rcvd; extern int optind; extern char *optarg; +void dumplog(); +void dumpppp(); +void show_time(); +void handle_ccp(); + +int main(ac, av) int ac; char **av; @@ -105,6 +112,7 @@ main(ac, av) exit(0); } +void dumplog(f) FILE *f; { @@ -183,7 +191,7 @@ dumplog(f) show_time(f, c); break; default: - printf("?%.2x\n"); + printf("?%.2x\n", c); } } } @@ -244,6 +252,7 @@ struct pkt { unsigned char dbuf[8192]; +void dumpppp(f) FILE *f; { @@ -311,7 +320,7 @@ dumpppp(f) ++r; ++r; if (endp - r > mru) - printf(" ERROR: length (%d) > MRU (%d)\n", + printf(" ERROR: length (%zd) > MRU (%d)\n", endp - r, mru); if (decompress && fcs == PPP_GOODFCS) { /* See if this is a CCP or compressed packet */ @@ -412,7 +421,7 @@ dumpppp(f) show_time(f, c); break; default: - printf("?%.2x\n"); + printf("?%.2x\n", c); } } } @@ -429,6 +438,7 @@ struct compressor *compressors[] = { NULL }; +void handle_ccp(cp, dp, len) struct pkt *cp; u_char *dp; @@ -485,6 +495,7 @@ handle_ccp(cp, dp, len) } } +void show_time(f, c) FILE *f; int c;