/** ALOE headers */ #include #include #include #include "typetools.h" #include "itf_types.h" #include "inputs.h" #include "outputs.h" #include "stats.h" unsigned int poly; int longblock,longcrc,numblocks; enum mode_t mode; int nof_packets,nof_errpkts,nof_err,errorsblk,total; unsigned int totalpkts,totalerrors; int t; char input_bits[INPUT_MAX_DATA*8]; int first=1; int process_input(int len) { int l,i,n; char *wptr; int ilongblock,olongblock; ilongblock = (mode==ADD)?longblock:longblock+longcrc; olongblock = (mode==ADD)?longblock+longcrc:longblock; if (len!=typeSizeArray(TYPE_BITSTREAM,numblocks*ilongblock)) { Log("CRC: Invalid input length: Mode %s, len=%d, numblocks=%d, longblock=%d\n",(mode==ADD)?"ADD":"CHECK",len,numblocks,longblock); } n=1; if (mode==CHECK) { n=0; for (i=0;i