#include #include #include /* getenv, exit */ #include #include #include #include #include "common.h" #include "message.h" #include "buffer.h" #include "stats.h" #include "netvar.h" // this tasks process ID and its master process ID pid_t mypid; pid_t Masterpid; int verbose = 0; // Shared Memory Key to use key_t shmkey = SHMKEY; // address of shared data area void * shm_dataarea; int * StatsMem[NUMCOUNTERS]; int * RatesMem[NUMCOUNTERS]; void MERGE_Stats(); void stats_init(); void Usage(char *progname) { fprintf(stderr,"Usage\n%s\n",progname); exit(1); } // data link interface int main(int argc, char *argv[]) { int i=0; int j; int size; int index; mypid = getpid(); Masterpid = getppid(); msg_init(); sig_init(); report_version(); // defaults for configuration information which may be supplied via the command line shmkey = SHMKEY; /* set default value */ // command line arguments if (argc >1) { for(i=1;i