in reply to Re: multithreading solution to the below problem
in thread multithreading solution to the below problem

hey there..thanks for ur reply...pardon me for my lack of knowledge on perl, i did not completely get ur answer :-O let me rephrase, if there are IP1,IP2,...IP255 alive machines in a subnet, the current way of doing is, wait for scan of IP1 to complete and then start scan of IP2 and so on,This takes a lot of time to complete the scan, i am looking into ways where i can send a scan request to more than one machine simultaneously, Does your answer cover this..can u please elaborate.
  • Comment on Re^2: multithreading solution to the below problem

Replies are listed 'Best First'.
Re^3: multithreading solution to the below problem
by Corion (Patriarch) on Jun 25, 2009 at 08:36 UTC

    Have you read Net::Ping? It describes how you can ping multiple hosts without even needing threads. Please just read Net::Ping and ask specific questions after you've done so. The relevant example from the Net::Ping documentation is:

    # Like tcp protocol, but with many hosts $p = Net::Ping->new("syn"); $p->port_number(getservbyname("http", "tcp")); foreach $host (@host_array) { $p->ping($host); } while (($host,$rtt,$ip) = $p->ack) { print "HOST: $host [$ip] ACKed in $rtt seconds.\n"; }
      Thanks Corion