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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|