parsing, data structures and sendpacket defined