Commit 0905dfc3 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

iphlpapi: Set ConnectionType in GetAdaptersAddresses.

parent df9191ae
...@@ -608,6 +608,16 @@ static DWORD typeFromMibType(DWORD mib_type) ...@@ -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) static ULONG v4addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs)
{ {
ULONG ret, i, j; ULONG ret, i, j;
...@@ -814,6 +824,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD ...@@ -814,6 +824,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD
getInterfacePhysicalByIndex(index, &buflen, aa->PhysicalAddress, &type); getInterfacePhysicalByIndex(index, &buflen, aa->PhysicalAddress, &type);
aa->PhysicalAddressLength = buflen; aa->PhysicalAddressLength = buflen;
aa->IfType = typeFromMibType(type); aa->IfType = typeFromMibType(type);
aa->ConnectionType = connectionTypeFromMibType(type);
getInterfaceMtuByName(name, &aa->Mtu); getInterfaceMtuByName(name, &aa->Mtu);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment