From: Juan Lang Date: Thu, 16 Sep 2010 17:44:04 +0000 (-0700) Subject: iphlpapi: Set ConnectionType in GetAdaptersAddresses. X-Git-Tag: 1.3.3-alt1.1~1^2~3^2~43 X-Git-Url: http://git.etersoft.ru/projects/?a=commitdiff_plain;h=0905dfc3e7d0c95a479aaf4ad001396c448fac0e;p=wine%2Feterwine.git iphlpapi: Set ConnectionType in GetAdaptersAddresses. --- diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index d06b44c1eb..6ec06e818f 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -608,6 +608,16 @@ static DWORD typeFromMibType(DWORD mib_type) } } +static DWORD connectionTypeFromMibType(DWORD mib_type) +{ + switch (mib_type) + { + case MIB_IF_TYPE_PPP: return NET_IF_CONNECTION_DEMAND; + case MIB_IF_TYPE_SLIP: return NET_IF_CONNECTION_DEMAND; + default: return NET_IF_CONNECTION_DEDICATED; + } +} + static ULONG v4addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs) { ULONG ret, i, j; @@ -814,6 +824,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD getInterfacePhysicalByIndex(index, &buflen, aa->PhysicalAddress, &type); aa->PhysicalAddressLength = buflen; aa->IfType = typeFromMibType(type); + aa->ConnectionType = connectionTypeFromMibType(type); getInterfaceMtuByName(name, &aa->Mtu);