Adding some packet parsing code