aboutsummaryrefslogtreecommitdiffstats
path: root/nocompile/libexec/peerip.pl
diff options
context:
space:
mode:
Diffstat (limited to 'nocompile/libexec/peerip.pl')
-rwxr-xr-xnocompile/libexec/peerip.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/nocompile/libexec/peerip.pl b/nocompile/libexec/peerip.pl
new file mode 100755
index 0000000..2000ad9
--- /dev/null
+++ b/nocompile/libexec/peerip.pl
@@ -0,0 +1,5 @@
+#!/usr/pkg/bin/perl
+use Socket;
+($port,$addr) = sockaddr_in(getpeername(STDIN));
+print inet_ntoa($addr) . "\n";
+