wxfjordan has asked for the wisdom of the Perl Monks concerning the following question:

I have a ADSL modem. There are many parameter in modem after the modem connect internet.
How to use Perl to get this modem information?

for example:

1. I want to get internet IP address.
2. DNS
3. Firewall.
etc..

I want to get more imforation of modem. How to make it? Please give me some direction.

Thanks!!!

Replies are listed 'Best First'.
Re: Perl get ADSL modem imformation.
by GrandFather (Saint) on Aug 24, 2006 at 00:21 UTC

    I suspect that depends a great deal on the modem. The modem that I use has a web interface that can be accessed through http:/10.1.1.1/ so the various web scraping tools such as LWP and WWW::Mechanize could be used to access the information.

    It may be that someone has written code for your particular modem and if you mention the modem type you may get the information you want. Otherwise, go read some documentation (modem documentation and the modules mentioned above). :)


    DWIM is Perl's answer to Gödel
Re: Perl get ADSL modem imformation.
by jdtoronto (Prior) on Aug 24, 2006 at 00:22 UTC
    Generally this sort of information is found using SNMP (Simple Network Management Protocol), to do this you need to find the information on your particular modem, for this try here and maybe try their forums.

    jdtoronto

Re: Perl get ADSL modem imformation.
by planetscape (Chancellor) on Aug 24, 2006 at 04:48 UTC
Re: Perl get ADSL modem imformation.
by gawatkins (Monsignor) on Aug 24, 2006 at 03:57 UTC

    You could use Perl to parse the output of either the "ifconfig" for *nix os or the "ipconfig" for windows, either will give the information that you desire.

    Thank you,
    Greg W
A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.