de-globalized do_udp