use table driven test to test more variations and added basic header and packet structs