static inline uint16_t udp_port_scan(net::Inet& inet) { for (uint16_t udp_port = 1; udp_port < 65535; udp_port++) { if (inet.udp().is_bound({inet.ip_addr(), udp_port})) { return udp_port; } } return 0; }