News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

where is IP_ADAPTER_INFO struct ?

Started by debugee, May 10, 2012, 02:10:45 AM

Previous topic - Next topic

debugee


jj2007

Here it is:
typedef struct _IP_ADAPTER_INFO {
  struct _IP_ADAPTER_INFO  *Next;
  DWORD                   ComboIndex;
  char                    AdapterName[MAX_ADAPTER_NAME_LENGTH + 4];
  char                    Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4];
  UINT                    AddressLength;
  BYTE                    Address[MAX_ADAPTER_ADDRESS_LENGTH];
  DWORD                   Index;
  UINT                    Type;
  UINT                    DhcpEnabled;
  PIP_ADDR_STRING         CurrentIpAddress;
  IP_ADDR_STRING          IpAddressList;
  IP_ADDR_STRING          GatewayList;
  IP_ADDR_STRING          DhcpServer;
  BOOL                    HaveWins;
  IP_ADDR_STRING          PrimaryWinsServer;
  IP_ADDR_STRING          SecondaryWinsServer;
  time_t                  LeaseObtained;
  time_t                  LeaseExpires;
} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;

dedndave

#2
it may also be found in Iptypes.h (use Iphlpapi.h - a little confusing, there)
and here...

http://msdn.microsoft.com/en-us/library/windows/desktop/aa366062%28v=vs.85%29.aspx

which includes a nice code example

MichaelW

I posted an example, that tests against a C app using the Microsoft-defined structures, here:

http://www.masm32.com/board/index.php?topic=16099.msg133514#msg133514

Note that the printf macro is now defined in the MASM32 macros.asm.
eschew obfuscation

dedndave

i just happened upon some related stuff by Tom Bleeker...

about 40% down the page...
http://www.madwizard.org/programming/toolarchive

headings:
AdapterInfo beta
IP Helper API includes