aellis has asked for the wisdom of the Perl Monks concerning the following question:
socket( ICMP, PF_INET, SOCK_RAW, $proto ) ||
die "socket failed: $!";
Later, I use select to detect an incoming ICMP packet.
vec( $rin, fileno( ICMP ), 1 ) = 1;
$ein = $rin;
for(;;) {
logMsg( "Entering Select\n" ) if( $::verbose > 0 );
# timeout 5 minutes so messages show up in log
my($nfound, $timeleft) =
select($rout=$rin,$wout=$win,$eout=$ein,60);
The select successfully returns on timeout, but never detects when there is an ICMP packet coming in?
On Solaris, this works properly. Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOCK_RAW ICMP on windows
by pg (Canon) on Oct 27, 2003 at 22:57 UTC |