Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 1 May 2008 05:39:46 -0700 (PDT),    group: microsoft.public.platformsdk.networking        back       


Help with GetAdaptersAddresses   
I am having problems in understanding how GetAdapterAddresses
functions works. I am trying to get the UnicastAddresses along with
the Prefixes for an interface. This is how I have used this function

PIP_ADAPTER_ADDRESSES table;

some allocation code

GetAdaptersAddresses(AF_UNSPEC,
                                 GAA_FLAG_INCLUDE_PREFIX |
                                 GAA_FLAG_SKIP_ANYCAST |
                                 GAA_FLAG_SKIP_DNS_SERVER |
                                 GAA_FLAG_SKIP_FRIENDLY_NAME ,
                                 NULL, table, &size);

I can get all unicast addresses by traversing the list starting with
"FirstUnicastAddress" and prefixes through "FirstPrefix" members of
IP_ADAPTER_ADDRESSES structure . However, how do I associate each
prefix with the corresponding address ? For testing purposes I
assigned 5 IP addresses with some common subnets. In this case I get
only three prefixes and that too in no order.

How should I interpret this result? Is there a better API for doing
this (Getting IP addresses/subnet for an interface)? I also need to
support IPv6 addresses as well.

--
Regards,
Ranjan
date: Thu, 1 May 2008 05:39:46 -0700 (PDT)   author:   Rnjn

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us