So here's what I'm trying to do: Real device at 192.168.1.102 sends UDP broadcasts to 255.255.255.255:31071 Emulator: redir add udp:31071:31071 Emulator receives UDP broadcasts on 0.0.0.0:31071.
This all works correctly, and I'm happy about it. The next step is for the emulator to find out where the broadcast came from and connect to a TCP port on it. The real device is listening for a connection at TCP 192.168.1.102:31071 Here's the problem: On the emulator, the DatagramPacket's getHostAddress() is returning 10.0.2.2. This confuses me because isn't that method supposed to be telling me where the packet came from? It seems to me that it's being rewritten by NAT or it's telling me where it was received, which would make sense. What I need is the IP of the sender of the packet. Any help is appreciated. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

