in reply to Using Net::Ping for broadcast address

Sounds like a system call to nmap might do what you want.   (code) MAC n' IP cheese shows how I did something somewhat similar using nmap and Net::Ping.

http://www.insecure.org/nmap/

    cheers,
    Don
    bumbling toward Perl Adept
    (it's pronounced "why-bick")

  • Comment on Re: Using Net::Ping for broadcast address (nmap -sP a.b.c.d/mask)

Replies are listed 'Best First'.
Re: Re: Using Net::Ping for broadcast address (nmap -sP a.b.c.d/mask)
by birdbrane (Chaplain) on Mar 30, 2001 at 23:48 UTC
    THRAK,

    Yes, I am running the script as root, but trying an icmp (or tcp) hasn't worked. The docs don't seem to be helpful in that respect, but then again, I am sure most people don't use ping for this type of thing (but they should). :)

    Don,

    I went on to command line and tried the nmap command you recommended, but in order to get it to recognize that the subnet as a whole was up, I had to get a response back from all hosts. I am just interested in getting a single line back, (or even a '0' return code) upon success. I think that I am going to have to stick with a ping system call, as it doesn't seem that Net::Ping will ping a .0 address.

    Thanks for the suggestions and help,

    Joe