xsawyerx / sys-hostip

Sys::HostIP - Try extra hard to get ip address related info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows Vista, Server 2008 & Non-English Systems [rt.cpan.org #49426]

xsawyerx opened this issue · comments

https://rt.cpan.org/Ticket/Display.html?id=49426

Hi,

I've outlined a few issues that prevent Sys::HostIP from retrieving IP 
addresses on Vista, Server 2008 & non-English systems.


1) Windows Vista and Server 2008

The output from ipconfig now seems to prepend lines containing an 
adapters IP addresse with "IPv4 Address" rather than "IP Address".

C:\>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix  . :
    Link-local IPv6 Address . . . . . : fe10::ae5b:b47:bae3:904e%11
    IPv4 Address. . . . . . . . . . . : 192.168.23.11
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1

Tunnel adapter Local Area Connection* 6:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix  . :

Tunnel adapter Local Area Connection* 7:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix  . :


2) Non-English systems

The ipconfig command on a Swedish Windows Server 2008 system will give 
something of the form:


C:\>ipconfig

IP-konfiguration f�r Windows


Ethernet-anslutning Anslutning till lokalt n�tverk:

    Anslutningsspecifika DNS-suffix . :
    L�nklokal IPv6-adress . . . . . . : ff88::b6fa:c6e1:9a9a:9114%10
    IPv4-adress . . . . . . . . . . . : 192.168.40.241
    N�tmask . . . . . . . . . . . . . : 255.255.255.0
    Standard-gateway. . . . . . . . . : 192.168.40.1

Tunnelanslutning: Anslutning till lokalt n�tverk*:

    Tillst�nd . . . . . . . . . . . . : Fr�nkopplad
    Anslutningsspecifika DNS-suffix . :

Tunnelanslutning: Anslutning till lokalt n�tverk* 8:

    Tillst�nd . . . . . . . . . . . . : Fr�nkopplad
    Anslutningsspecifika DNS-suffix . :



Best Wishes

Peter Walsham


-- 
Axomic Ltd
56 Compton Street
London EC1V 0ET, UK
t: +44 (0)870 850 0435
m: +44 (0)7812 122418
http://www.axomic.com

The information contained in this message is confidential and should not
be disclosed to any third party whether or not you are the intended
addressee indicated in the message. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
Axomic Ltd. If you are not the intended recipient, be advised that you
have received this email in error and that any use, dissemination,
printing, forwarding or copying of this e mail is strictly prohibited.

Theoretically, PR#15 should address the non-English Windows system problem mentioned in this issue.

Also, the first item in the issue mentions checking for IPv4 instead of just IP. It seems that the dist has been able to handle this since 2d9d9e6, hence this is also not a problem anymore.

Solved by #15.