in reply to Re^3: Discriminating between local and remote IP's
in thread Discriminating between local and remote IP's

While it is true that using IP addresses for trust is not good security, it is easy to find out on which IP a connection came in.
getsockname SOCKET Returns the packed sockaddr address of this end of the SOCKET connection, in case you don't know the address because you have several different IPs that the connection might have come in on.
HTH, --traveler