Larry,
I thought that MIB_IPADDRROW::wType distinguished just what you want to
know.
MIB_IPADDR_DYNAMIC -> DHCP
MIB_IPADDR_TRANSIENT -> Added by somebody
So (0 == (wType & (MIB_IPADDR_DYNAMIC|MIB_IPADDR_TRANSIENT))) might be what
you are looking for. And MIB_IPADDR_PRIMARY would be ‘the first’ static IP
address.
Of course you have to digest GetIpAddrTable() and do the lifting to
correlate to your IfIndex.
And how is the OID_GEN_NETWORK_LAYER_ADDRESSES scrambled on NT6? I don’t
recall seeing that (but then again, I have not looked specifically). Is
your MP edge NT6 or NT5?
Good Luck,
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@honeywell.com
Sent: Wednesday, May 12, 2010 5:08 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Finding static IP address for an interface
We do have certain rules as to not deleting the first created IP address
from the IPv4 property page, but others could be added. In NDIS 5, XP/s2003,
the OID_GEN_NETWORK_LAYER_ADDRESSES passed in the IP addresses in order of
creation so we used the first one. OID_GEN_NETWORK_LAYER_ADDRESSES is
scambled on Vista/s2008/Win7 and is useless for trying to get the IPs,
that’s why I use GetUnicastIpAddressTable().
I have found that
\REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfa
ces"mux GUID" does have a list at ‘IPAddess’ that contains just the static
IP addresses in creation order, but no temperary IPs. I now have a
combination of the two to get all IPs.
I was hoping that the IP Helper Functions had an api to use instead of
hitting the registry.
Larry C
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer