Changeset 7264 for trunk/src/iphlpapi/iphlpapi.cpp
- Timestamp:
- Oct 29, 2001, 2:37:29 PM (24 years ago)
- 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:21phaller Exp $ */1 /* $Id: iphlpapi.cpp,v 1.5 2001-10-29 13:37:29 phaller Exp $ */ 2 2 /* 3 3 * IPHLPAPI library … … 44 44 strcpy(pipAdapters->AdapterName, "ODIN IPHLPAPI Test Adapter"); 45 45 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; 53 55 pipAdapters->DhcpEnabled = 0; 54 56 … … 59 61 iasLocalhost.Context = 0; 60 62 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 61 70 memcpy((char*)&pipAdapters->IpAddressList, (char*)&iasLocalhost, sizeof(iasLocalhost)); 62 71 pipAdapters->CurrentIpAddress = &pipAdapters->IpAddressList; 63 memcpy((char*)&pipAdapters->GatewayList, (char*)&ias Localhost, sizeof(iasLocalhost));72 memcpy((char*)&pipAdapters->GatewayList, (char*)&iasGateway, sizeof(iasGateway)); 64 73 memset((char*)&pipAdapters->DhcpServer, 0, sizeof( IP_ADDR_STRING ) ); 65 74 pipAdapters->HaveWins = 0; … … 130 139 //****************************************************************************** 131 140 //****************************************************************************** 141 142 // Note: returns error 50 under NT4 (NOT_SUPPORTED) 143 // so we better check out alternative ways, too. 144 132 145 ODINFUNCTION2(DWORD, GetAdaptersInfo, 133 146 PIP_ADAPTER_INFO, pAdapterInfo,
Note:
See TracChangeset
for help on using the changeset viewer.