Hello all :
Currently, I know the following registry entries correspond to the IP
configuration of the network address¡G
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services%NIC%\Parameters\Tcpip]
Where NIC means the service key for the network adapter.
However, I can not figure out how to get those “service keys” in order
to get the corresponding IP Address.
I am using RtlQueryRegistryValues now. But I can not make it enumerate
all stuffs under CurrentControlSet\Services …
Any suggestion ?
Smore Hung
IP addresses are in
Services\Tcpip\Parameters\Interfaces{GUID}
This is exactly the subkey which can be accessed by
NdisOpenProtocolConfiguration.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Smore Hung”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, June 15, 2005 11:50 AM
Subject: [ntdev] How to get IP Address from Registry ?
> Hello all :
>
> Currently, I know the following registry entries correspond to the IP
> configuration of the network address¡G
> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services%NIC%\Parameters\Tcpip]
> Where NIC means the service key for the network adapter.
>
> However, I can not figure out how to get those “service keys” in order
> to get the corresponding IP Address.
>
> I am using RtlQueryRegistryValues now. But I can not make it enumerate
> all stuffs under CurrentControlSet\Services …
>
> Any suggestion ?
>
> Smore Hung
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
What are you trying to accomplish? I can only assume that you wish to get the IP address of some interface, or any interface. If you were, for instance, to ask the question “How do I get the IP addresses assigned to a particular NIC from within an IM driver bound to that NIC” you might get a really good answer. Just asking how to wander around the registry looking at TCPIP’s private registry settings may not get you the answer you need.
Look at OID_GEN_NETWORK_LAYER_ADDRESSES. Alternatively, you can do a bunch of work with TDI to find the IP addresses that correspond to the interface with the L2 MAC address of the NIC of interest.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Smore Hung
Sent: Wednesday, June 15, 2005 3:51 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to get IP Address from Registry ?
Hello all :
Currently, I know the following registry entries correspond to the IP configuration of the network address:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services%NIC%\Parameters\Tcpip]
Where NIC means the service key for the network adapter.
However, I can not figure out how to get those “service keys” in order to get the corresponding IP Address.
I am using RtlQueryRegistryValues now. But I can not make it enumerate all stuffs under CurrentControlSet\Services …
Any suggestion ?
Smore Hung
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@msn.com To unsubscribe send a blank email to xxxxx@lists.osr.com