From: Austin English Subject: [PATCH] iphlpapi: add GetIpNetTable2 stub Message-Id: <20180925205920.19322-1-austinenglish@gmail.com> Date: Tue, 25 Sep 2018 15:59:20 -0500 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45036 Signed-off-by: Austin English --- dlls/iphlpapi/iphlpapi.spec | 2 +- dlls/iphlpapi/iphlpapi_main.c | 11 +++++++++++ include/netioapi.h | 27 +++++++++++++++++++++++++++ include/nldef.h | 11 +++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec index fd00cc093a..30d9ed7efe 100644 --- a/dlls/iphlpapi/iphlpapi.spec +++ b/dlls/iphlpapi/iphlpapi.spec @@ -108,7 +108,7 @@ #@ stub GetIpInterfaceTable #@ stub GetIpNetEntry2 @ stdcall GetIpNetTable( ptr ptr long ) -#@ stub GetIpNetTable2 +@ stdcall GetIpNetTable2( long ptr ) @ stub GetIpNetTableFromStack #@ stub GetIpPathEntry #@ stub GetIpPathTable diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index c7140cd974..6273949147 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -3293,3 +3293,14 @@ DWORD WINAPI GetIpForwardTable2(ADDRESS_FAMILY family, PMIB_IPFORWARD_TABLE2 *ta if (!once++) FIXME("(%u %p): stub\n", family, table); return ERROR_NOT_SUPPORTED; } + +/****************************************************************** + * GetIpNetTable2 (IPHLPAPI.@) + */ +DWORD WINAPI GetIpNetTable2(ADDRESS_FAMILY family, PMIB_IPNET_TABLE2 *table) +{ + static int once; + + if (!once++) FIXME("(%u %p): stub\n", family, table); + return ERROR_NOT_SUPPORTED; +} diff --git a/include/netioapi.h b/include/netioapi.h index f15a80fdc8..6e5c2e2e25 100644 --- a/include/netioapi.h +++ b/include/netioapi.h @@ -193,6 +193,33 @@ typedef struct _MIB_IPFORWARD_TABLE2 MIB_IPFORWARD_ROW2 Table[ANY_SIZE]; } MIB_IPFORWARD_TABLE2, *PMIB_IPFORWARD_TABLE2; +typedef struct _MIB_IPNET_ROW2 { + SOCKADDR_INET Address; + NET_IFINDEX InterfaceIndex; + NET_LUID InterfaceLuid; + UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH]; + ULONG PhysicalAddressLength; + NL_NEIGHBOR_STATE State; + + union { + struct { + BOOLEAN IsRouter : 1; + BOOLEAN IsUnreachable : 1; + }; + UCHAR Flags; + }; + + union { + ULONG LastReachable; + ULONG LastUnreachable; + } ReachabilityTime; +} MIB_IPNET_ROW2, *PMIB_IPNET_ROW2; + +typedef struct _MIB_IPNET_TABLE2 { + ULONG NumEntries; + MIB_IPNET_ROW2 Table[ANY_SIZE]; +} MIB_IPNET_TABLE2, *PMIB_IPNET_TABLE2; + typedef VOID (WINAPI *PIPINTERFACE_CHANGE_CALLBACK)(PVOID, PMIB_IPINTERFACE_ROW, MIB_NOTIFICATION_TYPE); typedef VOID (WINAPI *PUNICAST_IPADDRESS_CHANGE_CALLBACK)(PVOID, PMIB_UNICASTIPADDRESS_ROW, diff --git a/include/nldef.h b/include/nldef.h index 983b96c552..776c61c922 100644 --- a/include/nldef.h +++ b/include/nldef.h @@ -111,4 +111,15 @@ typedef struct _NL_INTERFACE_OFFLOAD_ROD BOOLEAN TlGiantSendOffloadSupported : 1; } NL_INTERFACE_OFFLOAD_ROD, *PNL_INTERFACE_OFFLOAD_ROD; +typedef enum _NL_NEIGHBOR_STATE { + NlnsUnreachable, + NlnsIncomplete, + NlnsProbe, + NlnsDelay, + NlnsStale, + NlnsReachable, + NlnsPermanent, + NlnsMaximum, +} NL_NEIGHBOR_STATE, *PNL_NEIGHBOR_STATE; + #endif /* __WINE_NLDEF_H */ -- 2.16.4