Replace packet_info->ipproto with packet_info->layers loop to determine TCP/UDP.