Francois Gouget : include: Define the MIB_IF_OPER_STATUS_XXX constants using an enumeration in ipifcons .h.
Alexandre Julliard
julliard at winehq.org
Wed Dec 14 13:23:32 CST 2011
Module: wine
Branch: master
Commit: 732f5a7239b99cf29a2ca0d471df7e93f8168949
URL: http://source.winehq.org/git/wine.git/?a=commit;h=732f5a7239b99cf29a2ca0d471df7e93f8168949
Author: Francois Gouget <fgouget at free.fr>
Date: Tue Dec 13 21:10:40 2011 +0100
include: Define the MIB_IF_OPER_STATUS_XXX constants using an enumeration in ipifcons.h.
---
dlls/iphlpapi/ifenum.c | 2 +-
dlls/iphlpapi/ifenum.h | 2 +-
dlls/iphlpapi/iphlpapi_main.c | 3 ++-
include/ipifcons.h | 17 ++++++++++-------
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c
index e749cce..b4a956c 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 228d7ee..5600b0b 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 28185a8..3f72403 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 7fa0a11..d50f129 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__ */
More information about the wine-cvs
mailing list