All of this information is available through apis in various system DLLs. It can also be discovered by examining various keys in the registry. I don't know of any existing module (or combination of modules) that exposes it directly.

Certainly one could be written, using Win32::API or Inline::C or XS to access some combination of the following entrypoints:

netman.dll 77D0B3FC 5 HrPnpInstanceIdFromGuid 77D0177D 4 HrLanConnectionNameFromGuidOrPath DNSAPI.dll 76F329BE 21 DnsFreeConfigStructure 76F22D94 4B DnsQuery_W 76F25AD3 50 DnsRecordListFree 76F3757A 1C DnsFlushResolverCache 76F27A1D 44 DnsQueryConfigAllocEx 76F32E94 23 DnsGetCacheDataTable WS2_32.dll 71AB6979 7 WSAAddressToStringW 71AB2EE1 Ordinal 11 71AB2EAD Ordinal 8 71AB45C1 Ordinal 12 71AB3CCE Ordinal 111 71AB6A55 Ordinal 115 iphlpapi.dll 76D6D4F0 6E NhGetInterfaceNameFromGuid 76D62841 2D GetInterfaceInfo 76D65143 2A GetIfTable 76D63B9C 2E GetIpAddrTable 76D6AAC7 31 GetIpForwardTable 76D66AE8 6F NhpAllocateAndGetInterfaceInfoFromStack 76D6CCCF 39 GetNetworkParams 76D69B93 35 GetIpStatistics 76D63E54 1A GetAdaptersAddresses SETUPAPI.dll 7792C341 10E SetupDiCreateDeviceInfoList 7792EEEC 166 SetupDiOpenDeviceInfoW 7792B28D 11B SetupDiDestroyDeviceInfoList 7792EB01 146 SetupDiGetDeviceRegistryPropertyW DHCPCSVC.DLL 7D4BFD79 23 DhcpStaticRefreshParams 7D4C1F11 D DhcpHandlePnPEvent 7D4C1CA3 8 DhcpEnumClasses 7D4BFBC1 1B DhcpReleaseParameters 7D4BFA6F 0 DhcpAcquireParameters

But since that's just a selective imports dump from ipconfig.exe, which already knows how to get this information (and will be maintained by MS through patches and upgrades), and the output format of ipconfig /all is relatively straight forward to parse. The latter approach seems like a far simpler, quicker, and more maintainable way to go.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: How can I get current IP,DNS,MAC,GW under XP? by BrowserUk
in thread How can I get current IP,DNS,MAC,GW under XP? by perllee

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.