Hi,

My question is this:

Can I use Net::Pcap or Net::xxxx?? to lookup subnet info for a "foreign" address.

Usage - I am trying to write a PHP + Perl combination of scripts for a work related web application, that in conjuction with Nagios, can auto discover information about the current subnet, and hopefully (this is the related question) tangential subnet's information related to live hosts.

The application - Well, w/o giving up too much info =) I want to create a front end to setting up Nagios on the fly with as much auto-discovered information about connected hosts, both on the current subnet from the installed base, and if possible info on connected hosts on subnets that are Grokkable beyond the current subnet.

Progress so far - I have written enough code in PHP and perl to be able to lookup live hosts and their port info based upon (my testing front end form) a beginning and an ending IP range. This of course I can do 'as_long_as_I_know' which range of addresses to query, and using that method, of course, I don't really need to know whether or not its the current subnet or not....

But, I am trying to develop this as a support application to be installed on "any" private network, and let the script do the work of "crawling" the current and/or appended networks, obviously up until they are met with squashing/filtering gateways, routers, firewalls etc...

I don't care if I fail on a search of a subnet, I just want to know where the query fails, and what info about that failure it gives back, e.g., what ports "are" open at that dead end...

I am not attempting to grok any info, other than is_alive, or not, in order to map that info into the hosts.cfg, services.cfg, hostgroups.cfg, that would in turn then come back to me (my script's logic) to map that info into the dependencies.cfg, checkcommands.cfg, etc... so that I don't really have to DO any work in order to setup Nagios.

nest pas?

any help appreciated. TIA, El Rico


In reply to Net::Pcap or Net::xxxx?? to lookup subnet info... by gardner1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.