Add structure to check type of message received from peer