include: Define the MIB_IF_OPER_STATUS_XXX constants using an enumeration in ipifcons.h.

This commit is contained in:
Francois Gouget 2011-12-13 21:10:40 +01:00 committed by Alexandre Julliard
parent cf76be61b2
commit 732f5a7239
4 changed files with 14 additions and 10 deletions

View File

@ -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;

View File

@ -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_ */

View File

@ -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);

View File

@ -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__ */