Add more error checking.
Assume that counters refer to packet WITHOUT L2, L3 and L4 header.
Export to mat file.