UDP server socket inaddr_any - How to get the real IP

Hello !

I seem to have the same problem as in http://www.unix.com/ip-networking/91203-inaddr_any-opposite.html\#post302262417
But I can't find a solution.
I have a UDP server socket bound to 0.0.0.0. The server hosts the addresses IP1, IP2 and IP3. I get an incoming request to IP1. I use recvfrom to obtain the datagram. How can I get the info that this packet has been sent to IP1.

Thanks alot !

Hans

Stevens covers this topic in Section 20.2 of Unix Network Programming, 2nd Ed, Volume 2.