add msg_pack/unpack and header_pack/unpack