Ignore:
Timestamp:
Oct 29, 2001, 2:37:29 PM (24 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/iphlpapi/iphlpapi.cpp

    r7009 r7264  
    1 /* $Id: iphlpapi.cpp,v 1.4 2001-10-10 22:55:21 phaller Exp $ */
     1/* $Id: iphlpapi.cpp,v 1.5 2001-10-29 13:37:29 phaller Exp $ */
    22/*
    33 *      IPHLPAPI library
     
    4444  strcpy(pipAdapters->AdapterName, "ODIN IPHLPAPI Test Adapter");
    4545  strcpy(pipAdapters->Description, "ODIN IPHLPAPI Test Adapter (faked information)");
    46   pipAdapters->AddressLength = 4;
    47   pipAdapters->Address[0] = 127;
    48   pipAdapters->Address[1] = 0;
    49   pipAdapters->Address[2] = 0;
    50   pipAdapters->Address[3] = 1;
    51   pipAdapters->Index = 1;
    52   pipAdapters->Type = 1;
     46  pipAdapters->AddressLength = 6; // MAX address
     47  pipAdapters->Address[0] = 'V';
     48  pipAdapters->Address[1] = 'P';
     49  pipAdapters->Address[2] = 'C';
     50  pipAdapters->Address[3] = 'O';
     51  pipAdapters->Address[4] = 'S';
     52  pipAdapters->Address[5] = '2';
     53  pipAdapters->Index = 16777218;
     54  pipAdapters->Type = 6;
    5355  pipAdapters->DhcpEnabled = 0;
    5456 
     
    5961  iasLocalhost.Context = 0;
    6062 
     63  static IP_ADDR_STRING iasGateway;
     64  iasGateway.Next = NULL;
     65  strcpy((char*)&iasGateway.IpAddress,"192.168.1.1");
     66  strcpy((char*)&iasGateway.IpMask, "255.255.255.0");
     67  iasGateway.Context = 0;
     68 
     69 
    6170  memcpy((char*)&pipAdapters->IpAddressList, (char*)&iasLocalhost, sizeof(iasLocalhost));
    6271  pipAdapters->CurrentIpAddress = &pipAdapters->IpAddressList;
    63   memcpy((char*)&pipAdapters->GatewayList,   (char*)&iasLocalhost, sizeof(iasLocalhost));
     72  memcpy((char*)&pipAdapters->GatewayList,   (char*)&iasGateway, sizeof(iasGateway));
    6473  memset((char*)&pipAdapters->DhcpServer, 0, sizeof( IP_ADDR_STRING ) );
    6574  pipAdapters->HaveWins = 0;
     
    130139//******************************************************************************
    131140//******************************************************************************
     141
     142// Note: returns error 50 under NT4 (NOT_SUPPORTED)
     143// so we better check out alternative ways, too.
     144
    132145ODINFUNCTION2(DWORD,            GetAdaptersInfo,
    133146              PIP_ADAPTER_INFO, pAdapterInfo,
Note: See TracChangeset for help on using the changeset viewer.