Tmackell has asked for the wisdom of the Perl Monks concerning the following question:
What would would like to know is which IP address/interface the connection was created on? I have a few systems that have several networks connected to them. I want to print out the local interface/ip address that was used to create the connection, something like eth0-192.168.10.5 was able to open socket to 'peer's ip address'. I have poked around the socket perldoc and did not see what I was looking for, I figured I was being blind.. Thanks in advance,use IO::Socket; my $server = IO::Socket::INET->new( PeerAddr = 'peer's ip address', PeerPort = 8090, Proto = 'tcp' ) or die "Can't create client socket: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Socket Source interface
by jbert (Priest) on Jul 04, 2007 at 16:05 UTC | |
|
Re: Socket Source interface
by xiaoyafeng (Deacon) on Jul 04, 2007 at 13:56 UTC |