Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Discriminating between local and remote IP's

by traveler (Parson)
on Oct 04, 2004 at 20:07 UTC ( [id://396372] : note . print w/replies, xml ) Need Help??


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