#include #include "constants.h" #include "conn_table.h" extern double lasttime; extern int CHECKID; FILE* rfile = 0; int astart=0, aend=MAX_TIME, aint=0, debug = FALSE; unsigned int dests[MAX_DESTS]; int nd=0; unsigned int my_source = 0; unsigned int my_dest = 0; unsigned int my_smask; unsigned int my_dmask; int batch = FALSE; char Host[17]; int mask; int format = HUMAN; double offset = 0; double adjust = 0; void usage(char* prg) { printf("Usage: %s [-o ] [-v ] [-f offset]" "[-s | -d ]" "[-a ] [-m ]" "[-b dest_file] [-f human|machine] [-c 0|1] \n", prg); exit(0); } struct appstats AppStats[MAX_APPLICATIONS]; int numapps = 0; int main(int argc, char** argv) { int i, pargc=2; FILE* output, *dfile; char* pargv[3]; if (argc < 2) usage(argv[0]); /* Copy input file as the first argument to pcap_read */ pargv[0] = malloc(strlen(argv[0])); strcpy(pargv[0], argv[0]); pargv[1] = malloc(strlen(argv[1])); strcpy(pargv[1], argv[1]); for(i=2; i