ip_packet: Parse ports from TCP and UDP headers