added packet read and global state structs
factor-out of ProcessFile() guts
added process.c/.h to lib
added num of packets read
start factoring out packet-processing loop, starting with initial packet-check