*/
#include <stdio.h>
#include <unistd.h>
+#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
-#include "ppp_defs.h"
+
#include "ppp-comp.h"
int hexmode;
extern int optind;
extern char *optarg;
+void dumplog();
+void dumpppp();
+void show_time();
+void handle_ccp();
+
+int
main(ac, av)
int ac;
char **av;
exit(0);
}
+void
dumplog(f)
FILE *f;
{
show_time(f, c);
break;
default:
- printf("?%.2x\n");
+ printf("?%.2x\n", c);
}
}
}
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
+#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
struct pkt {
int cnt;
unsigned char dbuf[8192];
+void
dumpppp(f)
FILE *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 */
show_time(f, c);
break;
default:
- printf("?%.2x\n");
+ printf("?%.2x\n", c);
}
}
}
NULL
};
+void
handle_ccp(cp, dp, len)
struct pkt *cp;
u_char *dp;
}
}
+void
show_time(f, c)
FILE *f;
int c;