diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c index e749cce6ad4..b4a956c97b4 100644 --- a/dlls/iphlpapi/ifenum.c +++ b/dlls/iphlpapi/ifenum.c @@ -586,7 +586,7 @@ DWORD getInterfaceMtuByName(const char *name, PDWORD mtu) return ret; } -DWORD getInterfaceStatusByName(const char *name, PDWORD status) +DWORD getInterfaceStatusByName(const char *name, INTERNAL_IF_OPER_STATUS *status) { DWORD ret; int fd; diff --git a/dlls/iphlpapi/ifenum.h b/dlls/iphlpapi/ifenum.h index 228d7ee3053..5600b0bfe6a 100644 --- a/dlls/iphlpapi/ifenum.h +++ b/dlls/iphlpapi/ifenum.h @@ -119,6 +119,6 @@ ULONG v6addressesFromIndex(DWORD index, SOCKET_ADDRESS **addrs, ULONG *num_addrs char *toIPAddressString(unsigned int addr, char string[16]) DECLSPEC_HIDDEN; DWORD getInterfaceMtuByName(const char *name, PDWORD mtu) DECLSPEC_HIDDEN; -DWORD getInterfaceStatusByName(const char *name, PDWORD status) DECLSPEC_HIDDEN; +DWORD getInterfaceStatusByName(const char *name, INTERNAL_IF_OPER_STATUS *status) DECLSPEC_HIDDEN; #endif /* ndef WINE_IFENUM_H_ */ diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 28185a87131..3f72403c0b7 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -803,7 +803,8 @@ static ULONG adapterAddressesFromIndex(ULONG family, ULONG flags, DWORD index, { char name[IF_NAMESIZE], *ptr = (char *)aa + sizeof(IP_ADAPTER_ADDRESSES), *src; WCHAR *dst; - DWORD buflen, type, status; + DWORD buflen, type; + INTERNAL_IF_OPER_STATUS status; memset(aa, 0, sizeof(IP_ADAPTER_ADDRESSES)); aa->u.s.Length = sizeof(IP_ADAPTER_ADDRESSES); diff --git a/include/ipifcons.h b/include/ipifcons.h index 7fa0a115555..d50f129b62c 100644 --- a/include/ipifcons.h +++ b/include/ipifcons.h @@ -231,11 +231,14 @@ #define MIB_IF_ADMIN_STATUS_DOWN 2 #define MIB_IF_ADMIN_STATUS_TESTING 3 -#define MIB_IF_OPER_STATUS_NON_OPERATIONAL 0 -#define MIB_IF_OPER_STATUS_UNREACHABLE 1 -#define MIB_IF_OPER_STATUS_DISCONNECTED 2 -#define MIB_IF_OPER_STATUS_CONNECTING 3 -#define MIB_IF_OPER_STATUS_CONNECTED 4 -#define MIB_IF_OPER_STATUS_OPERATIONAL 5 +typedef enum _INTERNAL_IF_OPER_STATUS +{ + MIB_IF_OPER_STATUS_NON_OPERATIONAL = 0, + MIB_IF_OPER_STATUS_UNREACHABLE = 1, + MIB_IF_OPER_STATUS_DISCONNECTED = 2, + MIB_IF_OPER_STATUS_CONNECTING = 3, + MIB_IF_OPER_STATUS_CONNECTED = 4, + MIB_IF_OPER_STATUS_OPERATIONAL = 5, +} INTERNAL_IF_OPER_STATUS; -#endif /* WINE_ROUTING_IPIFCONS_H__ */ +#endif /* WINE_IPIFCONS_H__ */