_udp_packets code cleanup.