Packet parsing class in C++