In my college, private IP is used in the range of 10.x.x.x. Every department uses their own routers for their students. The router has IPs in the range of 10.x.x.x.. But, it gives dynamic IPs to the connected devices. My work is find out all the devices connected to the college LAN having an application installed.
So, what I am trying is broadcasting of UDP packets. I will get broadcast address of the current device and send a datagram packet at a particular port. The device will receive the packet from other devices too and from that packet I will know the IP address. But, the issue is in finding a device connected to another router. I don't think it's going to work. How can I find other devices and send data to them?